From 1d8f528002440c9c83ac178e1ad02ff0488b71bd Mon Sep 17 00:00:00 2001 From: AntonAndell Date: Fri, 5 Jan 2024 13:25:12 +0100 Subject: [PATCH] feat: Edit tendermint proto files to comply with non wasm clients --- contracts/javascore/ibc/build.gradle | 2 + .../core/integration/IBCIntegrationTest.java | 28 +- .../main/java/ibc/ics02/client/IBCClient.java | 6 +- .../ibc/ics03/connection/IBCConnection.java | 18 +- .../ics04/channel/IBCChannelHandshake.java | 16 +- .../java/ibc/ics04/channel/IBCPacket.java | 13 +- .../java/ibc/ics05/port/ModuleManager.java | 2 +- .../java/ibc/ics23/commitment/Compress.java | 2 +- .../main/java/ibc/ics23/commitment/Ics23.java | 2 +- .../main/java/ibc/ics23/commitment/Ops.java | 4 +- .../main/java/ibc/ics23/commitment/Proof.java | 2 +- .../ibc/ics23/commitment/types/Merkle.java | 4 +- .../main/java/ibc/ics24/host/IBCStore.java | 6 +- .../java/ibc/ics25/handler/IBCHandler.java | 2 +- .../ibc/ics25/handler/IBCHandlerChannel.java | 6 +- .../ibc/ics25/handler/IBCHandlerClient.java | 6 +- .../ics25/handler/IBCHandlerConnection.java | 10 +- .../ibc/ics25/handler/IBCHandlerPacket.java | 12 +- .../java/ibc/ics02/client/ClientTest.java | 10 +- .../ibc/ics03/connection/ConnectionTest.java | 12 +- .../ics04/channel/ChannelHandshakeTest.java | 16 +- .../java/ibc/ics04/channel/PacketTest.java | 17 +- .../java/ibc/ics23/commitment/Ics23Test.java | 2 +- .../ibc/ics23/commitment/LoadOpsTestData.java | 3 +- .../ics23/commitment/LoadProofTestData.java | 2 +- .../ics23/commitment/LoadVectorTestData.java | 3 +- .../java/ibc/ics23/commitment/ProofTest.java | 2 +- .../ics23/commitment/types/MerkleTest.java | 4 +- .../ibc/ics25/handler/IBCHandlerTest.java | 8 +- .../ibc/ics25/handler/IBCHandlerTestBase.java | 10 +- contracts/javascore/lib/build.gradle | 8 - .../ibc}/enums/clientstate/Status.java | 2 +- .../ibc}/interfaces/IIBCChannelHandshake.java | 4 +- .../ibc}/interfaces/IIBCClient.java | 6 +- .../ibc}/interfaces/IIBCConnection.java | 12 +- .../ibc}/interfaces/IIBCHandler.java | 2 +- .../ibc}/interfaces/IIBCHost.java | 2 +- .../ibc}/interfaces/IIBCModule.java | 2 +- .../ibc}/interfaces/IIBCPacket.java | 10 +- .../ibc}/interfaces/ILightClient.java | 2 +- .../messages/MsgChannelCloseConfirm.java | 2 +- .../structs/messages/MsgChannelCloseInit.java | 2 +- .../structs/messages/MsgChannelOpenAck.java | 2 +- .../messages/MsgChannelOpenConfirm.java | 2 +- .../structs/messages/MsgChannelOpenInit.java | 2 +- .../structs/messages/MsgChannelOpenTry.java | 2 +- .../messages/MsgConnectionOpenAck.java | 6 +- .../messages/MsgConnectionOpenConfirm.java | 2 +- .../messages/MsgConnectionOpenInit.java | 2 +- .../messages/MsgConnectionOpenTry.java | 2 +- .../structs/messages/MsgCreateClient.java | 2 +- .../messages/MsgPacketAcknowledgement.java | 2 +- .../ibc}/structs/messages/MsgPacketRecv.java | 2 +- .../structs/messages/MsgPacketTimeout.java | 4 +- .../messages/MsgRequestTimeoutPacket.java | 2 +- .../structs/messages/MsgUpdateClient.java | 2 +- .../messages/UpdateClientResponse.java | 4 +- .../proto/clients/tendermint/BlockIDFlag.java | 11 - .../clients/tendermint/SignedMsgType.java | 11 - .../icon/lightclient/v1/BlockUpdate.java | 43 - .../icon/lightclient/v1/ClientState.java | 130 - .../icon/lightclient/v1/ConsensusState.java | 42 - .../icon/proto/icon/types/v1/BTPHeader.java | 198 - .../proto/icon/types/v1/SignedHeader.java | 61 - .../lightclients/mockclient/build.gradle | 1 + .../main/java/ibc/mockclient/MockClient.java | 5 +- .../lightclients/tendermint/build.gradle | 3 + .../main/java/ibc/tendermint/Tendermint.java | 6 +- .../java/ibc/tendermint/TendermintHelper.java | 52 +- .../ibc/tendermint/TendermintLightClient.java | 45 +- .../java/ibc/tendermint/LightClientTest.java | 64 +- .../ibc/tendermint/LightClientTestBase.java | 48 +- .../ibc/tendermint/light/TendermintLight.java | 11972 ---------------- .../test/proto/amino/AminoProto.java | 161 + .../proto/cosmos/ics23/v1/BatchEntry.java | 447 + .../cosmos/ics23/v1/BatchEntryOrBuilder.java | 33 + .../proto/cosmos/ics23/v1/BatchProof.java | 390 + .../cosmos/ics23/v1/BatchProofOrBuilder.java | 23 + .../cosmos/ics23/v1/CommitmentProof.java | 649 + .../ics23/v1/CommitmentProofOrBuilder.java | 55 + .../cosmos/ics23/v1/CompressedBatchEntry.java | 447 + .../v1/CompressedBatchEntryOrBuilder.java | 33 + .../cosmos/ics23/v1/CompressedBatchProof.java | 582 + .../v1/CompressedBatchProofOrBuilder.java | 37 + .../ics23/v1/CompressedExistenceProof.java | 590 + .../v1/CompressedExistenceProofOrBuilder.java | 61 + .../ics23/v1/CompressedNonExistenceProof.java | 453 + .../CompressedNonExistenceProofOrBuilder.java | 41 + .../proto/cosmos/ics23/v1/ExistenceProof.java | 631 + .../ics23/v1/ExistenceProofOrBuilder.java | 46 + .../test/proto/cosmos/ics23/v1/HashOp.java | 155 + .../test/proto/cosmos/ics23/v1/InnerOp.java | 417 + .../cosmos/ics23/v1/InnerOpOrBuilder.java | 32 + .../test/proto/cosmos/ics23/v1/InnerSpec.java | 803 ++ .../cosmos/ics23/v1/InnerSpecOrBuilder.java | 91 + .../test/proto/cosmos/ics23/v1/LeafOp.java | 657 + .../cosmos/ics23/v1/LeafOpOrBuilder.java | 64 + .../test/proto/cosmos/ics23/v1/LengthOp.java | 237 + .../cosmos/ics23/v1/NonExistenceProof.java | 465 + .../ics23/v1/NonExistenceProofOrBuilder.java | 41 + .../test/proto/cosmos/ics23/v1/ProofSpec.java | 609 + .../cosmos/ics23/v1/ProofSpecOrBuilder.java | 61 + .../proto/cosmos/ics23/v1/ProofsProto.java | 16 + .../CancelSoftwareUpgradeProposal.java | 474 + ...ancelSoftwareUpgradeProposalOrBuilder.java | 49 + .../cosmos/upgrade/v1beta1/ModuleVersion.java | 411 + .../v1beta1/ModuleVersionOrBuilder.java | 39 + .../proto/cosmos/upgrade/v1beta1/Plan.java | 937 ++ .../cosmos/upgrade/v1beta1/PlanOrBuilder.java | 127 + .../v1beta1/SoftwareUpgradeProposal.java | 612 + .../SoftwareUpgradeProposalOrBuilder.java | 68 + .../cosmos/upgrade/v1beta1/UpgradeProto.java | 16 + .../test/proto/cosmos_proto/CosmosProto.java | 140 + .../cosmos_proto/InterfaceDescriptor.java | 510 + .../InterfaceDescriptorOrBuilder.java | 57 + .../proto/cosmos_proto/ScalarDescriptor.java | 949 ++ .../ScalarDescriptorOrBuilder.java | 123 + .../test/proto/cosmos_proto/ScalarType.java | 103 + .../test/proto/gogoproto/GogoProto.java | 1325 ++ .../core/client/v1/ClientConsensusStates.java | 623 + .../v1/ClientConsensusStatesOrBuilder.java | 55 + .../proto/ibc/core/client/v1/ClientProto.java | 16 + .../core/client/v1/ClientUpdateProposal.java | 760 + .../v1/ClientUpdateProposalOrBuilder.java | 91 + .../client/v1/ConsensusStateWithHeight.java | 469 + .../v1/ConsensusStateWithHeightOrBuilder.java | 47 + .../test/proto/ibc/core/client/v1/Height.java | 366 + .../ibc/core/client/v1/HeightOrBuilder.java | 29 + .../core/client/v1/IdentifiedClientState.java | 470 + .../v1/IdentifiedClientStateOrBuilder.java | 48 + .../test/proto/ibc/core/client/v1/Params.java | 486 + .../ibc/core/client/v1/ParamsOrBuilder.java | 58 + .../ibc/core/client/v1/UpgradeProposal.java | 677 + .../client/v1/UpgradeProposalOrBuilder.java | 73 + .../core/commitment/v1/CommitmentProto.java | 16 + .../ibc/core/commitment/v1/MerklePath.java | 382 + .../commitment/v1/MerklePathOrBuilder.java | 34 + .../ibc/core/commitment/v1/MerklePrefix.java | 252 + .../commitment/v1/MerklePrefixOrBuilder.java | 15 + .../ibc/core/commitment/v1/MerkleProof.java | 398 + .../commitment/v1/MerkleProofOrBuilder.java | 23 + .../ibc/core/commitment/v1/MerkleRoot.java | 250 + .../commitment/v1/MerkleRootOrBuilder.java | 15 + .../tendermint/v1/ClientState.java | 1927 +++ .../tendermint/v1/ClientStateOrBuilder.java | 244 + .../tendermint/v1/ConsensusState.java | 536 + .../v1/ConsensusStateOrBuilder.java | 55 + .../lightclients/tendermint/v1/Fraction.java | 304 + .../tendermint/v1/FractionOrBuilder.java | 21 + .../lightclients/tendermint/v1/Header.java | 590 + .../tendermint/v1/HeaderOrBuilder.java | 53 + .../tendermint/v1/Misbehaviour.java | 540 + .../tendermint/v1/MisbehaviourOrBuilder.java | 55 + .../tendermint/v1/TendermintLightProto.java | 16 + .../icon/lightclient/v1/BlockUpdate.java | 277 + .../lightclient/v1/BlockUpdateOrBuilder.java | 20 + .../icon/lightclient/v1/ClientState.java | 612 + .../lightclient/v1/ClientStateOrBuilder.java | 57 + .../icon/lightclient/v1/ConsensusState.java | 297 + .../v1/ConsensusStateOrBuilder.java | 21 + .../proto/icon/lightclient/v1/LightProto.java | 16 + .../icon/lightclient/v1/Misbehaviour.java | 470 + .../lightclient/v1/MisbehaviourOrBuilder.java | 43 + .../proto/icon/lightclient/v1/TrustLevel.java | 294 + .../lightclient/v1/TrustLevelOrBuilder.java | 21 + .../icon/proto/core/channel/Channel.java | 3249 +++++ .../proto/core/channel/ChannelOrBuilder.java | 131 + .../icon/proto/core/channel/ChannelProto.java | 16 + .../proto/icon/proto/core/channel/Packet.java | 1133 ++ .../proto/core/channel/PacketOrBuilder.java | 140 + .../icon/proto/core/channel/PacketState.java | 634 + .../core/channel/PacketStateOrBuilder.java | 69 + .../icon/proto/core/client/ClientProto.java | 16 + .../proto/icon/proto/core/client/Height.java | 364 + .../proto/core/client/HeightOrBuilder.java | 29 + .../proto/core/commitment/BatchEntry.java | 447 + .../core/commitment/BatchEntryOrBuilder.java | 33 + .../proto/core/commitment/BatchProof.java | 390 + .../core/commitment/BatchProofOrBuilder.java | 23 + .../core/commitment/CommitmentProof.java | 649 + .../commitment/CommitmentProofOrBuilder.java | 55 + .../core/commitment/CommitmentProto.java | 16 + .../core/commitment/CompressedBatchEntry.java | 447 + .../CompressedBatchEntryOrBuilder.java | 33 + .../core/commitment/CompressedBatchProof.java | 582 + .../CompressedBatchProofOrBuilder.java | 37 + .../commitment/CompressedExistenceProof.java | 590 + .../CompressedExistenceProofOrBuilder.java | 61 + .../CompressedNonExistenceProof.java | 453 + .../CompressedNonExistenceProofOrBuilder.java | 41 + .../proto/core/commitment/ExistenceProof.java | 631 + .../commitment/ExistenceProofOrBuilder.java | 46 + .../icon/proto/core/commitment/HashOp.java | 155 + .../icon/proto/core/commitment/InnerOp.java | 417 + .../core/commitment/InnerOpOrBuilder.java | 32 + .../icon/proto/core/commitment/InnerSpec.java | 803 ++ .../core/commitment/InnerSpecOrBuilder.java | 91 + .../icon/proto/core/commitment/LeafOp.java | 657 + .../core/commitment/LeafOpOrBuilder.java | 64 + .../icon/proto/core/commitment/LengthOp.java | 237 + .../proto/core/commitment/MerklePath.java | 382 + .../core/commitment/MerklePathOrBuilder.java | 34 + .../proto/core/commitment/MerklePrefix.java | 252 + .../commitment/MerklePrefixOrBuilder.java | 15 + .../proto/core/commitment/MerkleProof.java | 398 + .../core/commitment/MerkleProofOrBuilder.java | 23 + .../proto/core/commitment/MerkleRoot.java | 250 + .../core/commitment/MerkleRootOrBuilder.java | 15 + .../core/commitment/NonExistenceProof.java | 465 + .../NonExistenceProofOrBuilder.java | 41 + .../icon/proto/core/commitment/ProofSpec.java | 700 + .../core/commitment/ProofSpecOrBuilder.java | 73 + .../proto/core/commitment/ProofsProto.java | 16 + .../proto/core/connection/ConnectionEnd.java | 1154 ++ .../connection/ConnectionEndOrBuilder.java | 108 + .../core/connection/ConnectionProto.java | 16 + .../proto/core/connection/Counterparty.java | 626 + .../connection/CounterpartyOrBuilder.java | 72 + .../icon/proto/core/connection/Version.java | 591 + .../core/connection/VersionOrBuilder.java | 70 + .../test/proto/icon/types/v1/BTPHeader.java | 972 ++ .../icon/types/v1/BTPHeaderOrBuilder.java | 88 + .../test/proto/icon/types/v1/BlockIDFlag.java | 116 + .../test/proto/icon/types/v1/MerkleNode.java | 296 + .../icon/types/v1/MerkleNodeOrBuilder.java | 21 + .../proto/icon/types/v1/MerkleProofs.java | 382 + .../icon/types/v1/MerkleProofsOrBuilder.java | 23 + .../proto/icon/types/v1/SignedHeader.java | 619 + .../icon/types/v1/SignedHeaderOrBuilder.java | 60 + .../proto/icon/types/v1/SignedMsgType.java | 132 + .../test/proto/icon/types/v1/TypesProto.java | 16 + .../proto/tendermint/crypto/DominoOp.java | 478 + .../tendermint/crypto/DominoOpOrBuilder.java | 45 + .../proto/tendermint/crypto/KeysProto.java | 16 + .../test/proto/tendermint/crypto/Proof.java | 494 + .../test/proto/tendermint/crypto/ProofOp.java | 408 + .../tendermint/crypto/ProofOpOrBuilder.java | 33 + .../proto/tendermint/crypto/ProofOps.java | 390 + .../tendermint/crypto/ProofOpsOrBuilder.java | 23 + .../tendermint/crypto/ProofOrBuilder.java | 44 + .../proto/tendermint/crypto/ProofProto.java | 16 + .../proto/tendermint/crypto/PublicKey.java | 399 + .../tendermint/crypto/PublicKeyOrBuilder.java | 33 + .../test/proto/tendermint/crypto/ValueOp.java | 402 + .../tendermint/crypto/ValueOpOrBuilder.java | 38 + .../test/proto/tendermint/types/BlockID.java | 342 + .../proto/tendermint/types/BlockIDFlag.java | 116 + .../tendermint/types/BlockIDOrBuilder.java | 26 + .../proto/tendermint/types/BlockMeta.java | 482 + .../tendermint/types/BlockMetaOrBuilder.java | 43 + .../test/proto/tendermint/types/Commit.java | 595 + .../tendermint/types/CommitOrBuilder.java | 46 + .../proto/tendermint/types/CommitSig.java | 489 + .../tendermint/types/CommitSigOrBuilder.java | 43 + .../test/proto/tendermint/types/Data.java | 418 + .../proto/tendermint/types/DataOrBuilder.java | 44 + .../test/proto/tendermint/types/Header.java | 1445 ++ .../tendermint/types/HeaderOrBuilder.java | 166 + .../proto/tendermint/types/LightBlock.java | 371 + .../tendermint/types/LightBlockOrBuilder.java | 31 + .../test/proto/tendermint/types/Part.java | 390 + .../proto/tendermint/types/PartOrBuilder.java | 32 + .../proto/tendermint/types/PartSetHeader.java | 304 + .../types/PartSetHeaderOrBuilder.java | 21 + .../test/proto/tendermint/types/Proposal.java | 683 + .../tendermint/types/ProposalOrBuilder.java | 66 + .../proto/tendermint/types/SignedHeader.java | 371 + .../types/SignedHeaderOrBuilder.java | 31 + .../proto/tendermint/types/SignedMsgType.java | 132 + .../tendermint/types/SimpleValidator.java | 333 + .../types/SimpleValidatorOrBuilder.java | 26 + .../test/proto/tendermint/types/TxProof.java | 400 + .../tendermint/types/TxProofOrBuilder.java | 32 + .../proto/tendermint/types/TypesProto.java | 16 + .../proto/tendermint/types/Validator.java | 445 + .../tendermint/types/ValidatorOrBuilder.java | 38 + .../tendermint/types/ValidatorProto.java | 16 + .../proto/tendermint/types/ValidatorSet.java | 532 + .../types/ValidatorSetOrBuilder.java | 40 + .../test/proto/tendermint/types/Vote.java | 794 + .../proto/tendermint/types/VoteOrBuilder.java | 80 + .../test/proto/tendermint/version/App.java | 349 + .../tendermint/version/AppOrBuilder.java | 27 + .../proto/tendermint/version/Consensus.java | 306 + .../version/ConsensusOrBuilder.java | 21 + .../proto/tendermint/version/TypesProto.java | 16 + .../javascore/modules/mockapp/build.gradle | 1 + .../src/main/java/ibc/mockapp/MockApp.java | 4 +- contracts/javascore/proto-lib/build.gradle | 17 + .../java/cosmos/ics23/v1}/BatchEntry.java | 2 +- .../java/cosmos/ics23/v1}/BatchProof.java | 2 +- .../cosmos/ics23/v1}/CommitmentProof.java | 2 +- .../ics23/v1}/CompressedBatchEntry.java | 2 +- .../ics23/v1}/CompressedBatchProof.java | 2 +- .../ics23/v1}/CompressedExistenceProof.java | 2 +- .../v1}/CompressedNonExistenceProof.java | 2 +- .../java/cosmos/ics23/v1}/ExistenceProof.java | 2 +- .../main/java/cosmos/ics23/v1}/HashOp.java | 10 +- .../main/java/cosmos/ics23/v1}/InnerOp.java | 2 +- .../main/java/cosmos/ics23/v1}/InnerSpec.java | 2 +- .../main/java/cosmos/ics23/v1}/LeafOp.java | 2 +- .../main/java/cosmos/ics23/v1}/LengthOp.java | 2 +- .../cosmos/ics23/v1}/NonExistenceProof.java | 2 +- .../main/java/cosmos/ics23/v1}/ProofSpec.java | 2 +- .../CancelSoftwareUpgradeProposal.java | 60 + .../cosmos/upgrade/v1beta1/ModuleVersion.java | 61 + .../java/cosmos/upgrade/v1beta1/Plan.java | 114 + .../v1beta1/SoftwareUpgradeProposal.java | 77 + .../src/main/java/google/protobuf/Any.java} | 26 +- .../main/java/google/protobuf}/Duration.java | 2 +- .../main/java/google/protobuf}/Timestamp.java | 2 +- .../core/client/v1/ClientConsensusStates.java | 62 + .../core/client/v1/ClientUpdateProposal.java | 94 + .../client/v1/ConsensusStateWithHeight.java | 60 + .../main/java/ibc/core/client/v1/Height.java | 60 + .../core/client/v1/IdentifiedClientState.java | 61 + .../main/java/ibc/core/client/v1/Params.java | 45 + .../ibc/core/client/v1/UpgradeProposal.java | 96 + .../ibc/core/commitment/v1}/MerklePath.java | 2 +- .../ibc/core/commitment/v1}/MerklePrefix.java | 2 +- .../ibc/core/commitment/v1}/MerkleProof.java | 5 +- .../ibc/core/commitment/v1}/MerkleRoot.java | 2 +- .../tendermint/v1}/ClientState.java | 80 +- .../tendermint/v1}/ConsensusState.java | 12 +- .../lightclients/tendermint/v1}/Fraction.java | 2 +- .../lightclients/tendermint/v1/Header.java} | 34 +- .../tendermint}/v1/Misbehaviour.java | 18 +- .../java/icon/proto/core/channel/Channel.java | 0 .../java/icon/proto/core/channel/Packet.java | 4 +- .../icon/proto/core/channel/PacketState.java | 0 .../java/icon/proto/core/client/Height.java | 0 .../proto/core/connection/ConnectionEnd.java | 0 .../proto/core/connection/Counterparty.java | 5 +- .../icon/proto/core/connection/Version.java | 0 .../main/java/tendermint/crypto/DominoOp.java | 77 + .../main/java/tendermint/crypto/Proof.java | 96 + .../main/java/tendermint/crypto/ProofOp.java | 77 + .../java/tendermint/crypto/ProofOps.java} | 22 +- .../java/tendermint/crypto}/PublicKey.java | 21 +- .../main/java/tendermint/crypto/ValueOp.java | 59 + .../java/tendermint/types/ABCIParams.java | 43 + .../src/main/java/tendermint/types/Block.java | 93 + .../main/java/tendermint/types}/BlockID.java | 2 +- .../java/tendermint/types}/BlockIDFlag.java | 2 +- .../main/java/tendermint/types/BlockMeta.java | 94 + .../java/tendermint/types/BlockParams.java | 60 + .../tendermint/types}/CanonicalBlockID.java | 2 +- .../types}/CanonicalPartSetHeader.java | 2 +- .../tendermint/types/CanonicalProposal.java | 148 + .../java/tendermint/types}/CanonicalVote.java | 15 +- .../types/CanonicalVoteExtension.java | 95 + .../main/java/tendermint/types}/Commit.java | 2 +- .../java/tendermint/types}/CommitSig.java | 7 +- .../tendermint/types/ConsensusParams.java | 110 + .../src/main/java/tendermint/types/Data.java} | 24 +- .../types/DuplicateVoteEvidence.java | 112 + .../tendermint/types/EventDataRoundState.java | 78 + .../main/java/tendermint/types/Evidence.java | 59 + .../java/tendermint/types/EvidenceList.java} | 24 +- .../java/tendermint/types/EvidenceParams.java | 78 + .../java/tendermint/types/ExtendedCommit.java | 96 + .../tendermint/types/ExtendedCommitSig.java | 129 + .../java/tendermint/types/HashedParams.java | 60 + .../main/java/tendermint/types/Header.java} | 18 +- .../java/tendermint/types/LightBlock.java | 59 + .../types/LightClientAttackEvidence.java | 114 + .../src/main/java/tendermint/types/Part.java | 78 + .../java/tendermint/types}/PartSetHeader.java | 2 +- .../main/java/tendermint/types/Proposal.java | 147 + .../java/tendermint/types}/SignedHeader.java | 10 +- .../java/tendermint/types}/SignedMsgType.java | 2 +- .../tendermint/types}/SimpleValidator.java | 7 +- .../main/java/tendermint/types/TxProof.java | 77 + .../java/tendermint/types}/Validator.java | 7 +- .../tendermint/types/ValidatorParams.java | 45 + .../java/tendermint/types}/ValidatorSet.java | 2 +- .../java/tendermint/types/VersionParams.java | 43 + .../src/main/java/tendermint/types}/Vote.java | 43 +- .../src/main/java/tendermint/version/App.java | 61 + .../java/tendermint/version}/Consensus.java | 2 +- .../main/java/icon/score/proto/ProtoGen.java | 75 +- .../main/java/ibc/icon/score/util/Proto.java | 24 +- contracts/javascore/settings.gradle | 1 + .../javascore/xcall-connection/build.gradle | 2 + .../ibc/xcall/connection/IBCConnection.java | 2 +- .../xcall/connection/IBCConnectionTest.java | 2 +- .../connection/IBCConnectionTestBase.java | 6 +- .../clients/tendermint/TendermintLight.proto | 206 - proto/core/03-connection/Connection.proto | 7 +- proto/core/23-commitment/commitment.proto | 39 - proto/core/23-commitment/proofs.proto | 237 - scripts/generate_java_proto.sh | 29 + 392 files changed, 63813 insertions(+), 13444 deletions(-) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/enums/clientstate/Status.java (66%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCChannelHandshake.java (97%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCClient.java (88%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCConnection.java (76%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCHandler.java (96%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCHost.java (98%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCModule.java (99%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/IIBCPacket.java (90%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/interfaces/ILightClient.java (99%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelCloseConfirm.java (95%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelCloseInit.java (91%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelOpenAck.java (97%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelOpenConfirm.java (95%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelOpenInit.java (91%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgChannelOpenTry.java (96%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgConnectionOpenAck.java (98%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgConnectionOpenConfirm.java (94%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgConnectionOpenInit.java (95%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgConnectionOpenTry.java (98%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgCreateClient.java (96%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgPacketAcknowledgement.java (95%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgPacketRecv.java (94%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgPacketTimeout.java (95%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgRequestTimeoutPacket.java (94%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/MsgUpdateClient.java (92%) rename contracts/javascore/lib/src/main/java/{ibc/icon => icon/ibc}/structs/messages/UpdateClientResponse.java (96%) delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockIDFlag.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedMsgType.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/BlockUpdate.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ClientState.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ConsensusState.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BTPHeader.java delete mode 100644 contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedHeader.java delete mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/light/TendermintLight.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/amino/AminoProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntry.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntryOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntry.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntryOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/HashOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpec.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpecOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LengthOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpec.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpecOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofsProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposalOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersion.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersionOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/Plan.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/PlanOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposalOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/UpgradeProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/CosmosProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptor.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptorOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptor.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptorOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarType.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/gogoproto/GogoProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStates.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStatesOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposal.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposalOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeight.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeightOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Height.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/HeightOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Params.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ParamsOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposal.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposalOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/CommitmentProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePath.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePathOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefix.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefixOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRoot.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRootOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Fraction.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/FractionOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Header.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/HeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Misbehaviour.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/MisbehaviourOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/TendermintLightProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdate.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/LightProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/Misbehaviour.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/MisbehaviourOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevel.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevelOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Channel.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Packet.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketState.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketStateOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/ClientProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/Height.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/HeightOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntry.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntryOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntry.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntryOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/HashOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpec.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpecOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LengthOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePath.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePathOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefix.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefixOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRoot.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRootOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpec.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpecOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofsProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEnd.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEndOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Counterparty.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/CounterpartyOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Version.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/VersionOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeader.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BlockIDFlag.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNode.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNodeOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofs.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofsOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeader.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedMsgType.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/TypesProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/KeysProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/Proof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOps.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpsOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKey.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKeyOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOp.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOpOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockID.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDFlag.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMeta.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMetaOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Commit.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSig.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSigOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Data.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/DataOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Header.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/HeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlock.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlockOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Part.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeader.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Proposal.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ProposalOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeader.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeaderOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedMsgType.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidator.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidatorOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProof.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProofOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TypesProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Validator.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorProto.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSet.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSetOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Vote.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/VoteOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/App.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/AppOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/Consensus.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/ConsensusOrBuilder.java create mode 100644 contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/TypesProto.java create mode 100644 contracts/javascore/proto-lib/build.gradle rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/BatchEntry.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/BatchProof.java (96%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/CommitmentProof.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/CompressedBatchEntry.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/CompressedBatchProof.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/CompressedExistenceProof.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/CompressedNonExistenceProof.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/ExistenceProof.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/HashOp.java (58%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/InnerOp.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/InnerSpec.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/LeafOp.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/LengthOp.java (92%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/NonExistenceProof.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/cosmos/ics23/v1}/ProofSpec.java (98%) create mode 100644 contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java create mode 100644 contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/ModuleVersion.java create mode 100644 contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/Plan.java create mode 100644 contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java rename contracts/javascore/{lib/src/main/java/icon/proto/icon/types/v1/MerkleNode.java => proto-lib/src/main/java/google/protobuf/Any.java} (62%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/google/protobuf}/Duration.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/google/protobuf}/Timestamp.java (97%) create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientConsensusStates.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientUpdateProposal.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ConsensusStateWithHeight.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Height.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/IdentifiedClientState.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Params.java create mode 100644 contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/UpgradeProposal.java rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/ibc/core/commitment/v1}/MerklePath.java (96%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/connection => proto-lib/src/main/java/ibc/core/commitment/v1}/MerklePrefix.java (96%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/ibc/core/commitment/v1}/MerkleProof.java (86%) rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment => proto-lib/src/main/java/ibc/core/commitment/v1}/MerkleRoot.java (96%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/ibc/lightclients/tendermint/v1}/ClientState.java (62%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/ibc/lightclients/tendermint/v1}/ConsensusState.java (81%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/ibc/lightclients/tendermint/v1}/Fraction.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint/TmHeader.java => proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Header.java} (62%) rename contracts/javascore/{lib/src/main/java/icon/proto/icon/lightclient => proto-lib/src/main/java/ibc/lightclients/tendermint}/v1/Misbehaviour.java (77%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/channel/Channel.java (100%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/channel/Packet.java (96%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/channel/PacketState.java (100%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/client/Height.java (100%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/connection/ConnectionEnd.java (100%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/connection/Counterparty.java (89%) rename contracts/javascore/{lib => proto-lib}/src/main/java/icon/proto/core/connection/Version.java (100%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/crypto/DominoOp.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/crypto/Proof.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOp.java rename contracts/javascore/{lib/src/main/java/icon/proto/icon/types/v1/MerkleProofs.java => proto-lib/src/main/java/tendermint/crypto/ProofOps.java} (55%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/crypto}/PublicKey.java (72%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ValueOp.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/ABCIParams.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/Block.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/BlockID.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/icon/types/v1 => proto-lib/src/main/java/tendermint/types}/BlockIDFlag.java (87%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockMeta.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockParams.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/CanonicalBlockID.java (97%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/CanonicalPartSetHeader.java (97%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalProposal.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/CanonicalVote.java (87%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVoteExtension.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/Commit.java (98%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/CommitSig.java (91%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/ConsensusParams.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint/MerkleRoot.java => proto-lib/src/main/java/tendermint/types/Data.java} (55%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/DuplicateVoteEvidence.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/EventDataRoundState.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/Evidence.java rename contracts/javascore/{lib/src/main/java/icon/proto/core/commitment/MerklePrefix.java => proto-lib/src/main/java/tendermint/types/EvidenceList.java} (50%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceParams.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommit.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommitSig.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/HashedParams.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint/LightHeader.java => proto-lib/src/main/java/tendermint/types/Header.java} (93%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/LightBlock.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/LightClientAttackEvidence.java create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/Part.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/PartSetHeader.java (97%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/Proposal.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/SignedHeader.java (84%) rename contracts/javascore/{lib/src/main/java/icon/proto/icon/types/v1 => proto-lib/src/main/java/tendermint/types}/SignedMsgType.java (88%) rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/SimpleValidator.java (87%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/TxProof.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/Validator.java (91%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorParams.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/ValidatorSet.java (98%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/types/VersionParams.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/types}/Vote.java (76%) create mode 100644 contracts/javascore/proto-lib/src/main/java/tendermint/version/App.java rename contracts/javascore/{lib/src/main/java/icon/proto/clients/tendermint => proto-lib/src/main/java/tendermint/version}/Consensus.java (97%) delete mode 100644 proto/clients/tendermint/TendermintLight.proto delete mode 100644 proto/core/23-commitment/commitment.proto delete mode 100644 proto/core/23-commitment/proofs.proto create mode 100755 scripts/generate_java_proto.sh diff --git a/contracts/javascore/ibc/build.gradle b/contracts/javascore/ibc/build.gradle index 544ae3543..b5b783cad 100644 --- a/contracts/javascore/ibc/build.gradle +++ b/contracts/javascore/ibc/build.gradle @@ -5,6 +5,7 @@ dependencies { implementation("foundation.icon:javaee-scorex:$scorexVersion") implementation project(':lib') implementation project(':score-util') + implementation project(':proto-lib') testImplementation 'com.google.protobuf:protobuf-javalite:3.16.3' testImplementation 'foundation.icon:javaee-rt:0.9.3' @@ -45,6 +46,7 @@ jacocoTestReport { tasks.named('compileJava') { dependsOn(':score-util:jar') dependsOn(':lib:jar') + dependsOn(':proto-lib:jar') } optimizedJar { diff --git a/contracts/javascore/ibc/src/intTest/java/ibc/core/integration/IBCIntegrationTest.java b/contracts/javascore/ibc/src/intTest/java/ibc/core/integration/IBCIntegrationTest.java index 10c2d68ab..89231d2d1 100644 --- a/contracts/javascore/ibc/src/intTest/java/ibc/core/integration/IBCIntegrationTest.java +++ b/contracts/javascore/ibc/src/intTest/java/ibc/core/integration/IBCIntegrationTest.java @@ -12,26 +12,26 @@ import java.util.Map; import java.util.function.Consumer; -import ibc.icon.structs.messages.*; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; -import foundation.icon.jsonrpc.model.TransactionResult; -import foundation.icon.score.client.DefaultScoreClient; -import foundation.icon.score.client.Wallet; -import ibc.icon.integration.ScoreIntegrationTest; -import ibc.icon.interfaces.IIBCChannelHandshakeScoreClient; -import ibc.icon.interfaces.IIBCClientScoreClient; -import ibc.icon.interfaces.IIBCConnectionScoreClient; -import ibc.icon.interfaces.IIBCHandlerScoreClient; -import ibc.icon.interfaces.IIBCHostScoreClient; -import ibc.icon.interfaces.IIBCPacketScoreClient; import icon.proto.core.channel.Channel; import icon.proto.core.channel.Packet; import icon.proto.core.client.Height; -import icon.proto.core.connection.MerklePrefix; +import ibc.core.commitment.v1.MerklePrefix; import icon.proto.core.connection.Version; +import foundation.icon.jsonrpc.model.TransactionResult; +import foundation.icon.score.client.DefaultScoreClient; +import foundation.icon.score.client.Wallet; +import ibc.icon.integration.ScoreIntegrationTest; +import icon.ibc.interfaces.IIBCChannelHandshakeScoreClient; +import icon.ibc.interfaces.IIBCClientScoreClient; +import icon.ibc.interfaces.IIBCConnectionScoreClient; +import icon.ibc.interfaces.IIBCHandlerScoreClient; +import icon.ibc.interfaces.IIBCHostScoreClient; +import icon.ibc.interfaces.IIBCPacketScoreClient; +import icon.ibc.structs.messages.*; import score.Address; public class IBCIntegrationTest implements ScoreIntegrationTest { @@ -101,7 +101,7 @@ void establishConnection_fromICON() { MsgConnectionOpenInit msgInit = new MsgConnectionOpenInit(); MerklePrefix prefix = new MerklePrefix(); prefix.setKeyPrefix("ibc".getBytes()); - icon.proto.core.connection.Counterparty counterparty = new icon.proto.core.connection.Counterparty(); + core.connection.Counterparty counterparty = new core.connection.Counterparty(); counterparty.setClientId(counterPartyClientId); counterparty.setConnectionId(counterPartyConnectionId); counterparty.setPrefix(prefix); @@ -142,7 +142,7 @@ void establishConnection_fromCounterParty() { version.setFeatures(List.of("f1")); version.setIdentifier("id"); - icon.proto.core.connection.Counterparty counterparty = new icon.proto.core.connection.Counterparty(); + core.connection.Counterparty counterparty = new core.connection.Counterparty(); counterparty.setClientId(counterPartyClientId); counterparty.setConnectionId(counterPartyConnectionId); diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics02/client/IBCClient.java b/contracts/javascore/ibc/src/main/java/ibc/ics02/client/IBCClient.java index 566ba26f2..f014a5c96 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics02/client/IBCClient.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics02/client/IBCClient.java @@ -1,11 +1,11 @@ package ibc.ics02.client; -import ibc.icon.interfaces.ILightClient; import ibc.icon.score.util.Logger; import ibc.icon.score.util.NullChecker; -import ibc.icon.structs.messages.MsgCreateClient; -import ibc.icon.structs.messages.MsgUpdateClient; import ibc.ics24.host.IBCHost; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.structs.messages.MsgCreateClient; +import icon.ibc.structs.messages.MsgUpdateClient; import score.Address; import score.Context; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics03/connection/IBCConnection.java b/contracts/javascore/ibc/src/main/java/ibc/ics03/connection/IBCConnection.java index 681509f62..147917c5e 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics03/connection/IBCConnection.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics03/connection/IBCConnection.java @@ -4,19 +4,19 @@ import java.util.Arrays; import java.util.List; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Logger; -import ibc.icon.structs.messages.MsgConnectionOpenAck; -import ibc.icon.structs.messages.MsgConnectionOpenConfirm; -import ibc.icon.structs.messages.MsgConnectionOpenInit; -import ibc.icon.structs.messages.MsgConnectionOpenTry; -import ibc.ics02.client.IBCClient; -import ibc.ics24.host.IBCCommitment; import icon.proto.core.client.Height; import icon.proto.core.connection.ConnectionEnd; import icon.proto.core.connection.Counterparty; import icon.proto.core.connection.Version; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Logger; +import ibc.ics02.client.IBCClient; +import ibc.ics24.host.IBCCommitment; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.structs.messages.MsgConnectionOpenAck; +import icon.ibc.structs.messages.MsgConnectionOpenConfirm; +import icon.ibc.structs.messages.MsgConnectionOpenInit; +import icon.ibc.structs.messages.MsgConnectionOpenTry; import score.Context; import scorex.util.ArrayList; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCChannelHandshake.java b/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCChannelHandshake.java index 60290fab7..1da07d823 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCChannelHandshake.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCChannelHandshake.java @@ -3,16 +3,16 @@ import java.math.BigInteger; import java.util.List; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.score.util.ByteUtil; -import ibc.icon.structs.messages.MsgChannelCloseConfirm; -import ibc.icon.structs.messages.MsgChannelCloseInit; -import ibc.icon.structs.messages.MsgChannelOpenAck; -import ibc.icon.structs.messages.MsgChannelOpenConfirm; -import ibc.icon.structs.messages.MsgChannelOpenInit; -import ibc.icon.structs.messages.MsgChannelOpenTry; import icon.proto.core.channel.Channel; import icon.proto.core.connection.ConnectionEnd; +import ibc.icon.score.util.ByteUtil; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.structs.messages.MsgChannelCloseConfirm; +import icon.ibc.structs.messages.MsgChannelCloseInit; +import icon.ibc.structs.messages.MsgChannelOpenAck; +import icon.ibc.structs.messages.MsgChannelOpenConfirm; +import icon.ibc.structs.messages.MsgChannelOpenInit; +import icon.ibc.structs.messages.MsgChannelOpenTry; import ibc.ics03.connection.IBCConnection; import ibc.ics24.host.IBCCommitment; import score.Context; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCPacket.java b/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCPacket.java index 548588506..4cca5cedb 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCPacket.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics04/channel/IBCPacket.java @@ -1,20 +1,21 @@ package ibc.ics04.channel; -import ibc.icon.interfaces.ILightClient; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; -import ibc.icon.structs.messages.MsgRequestTimeoutPacket; import ibc.ics24.host.IBCCommitment; -import icon.proto.core.channel.Channel; -import icon.proto.core.channel.Packet; -import icon.proto.core.client.Height; -import icon.proto.core.connection.ConnectionEnd; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.structs.messages.MsgRequestTimeoutPacket; import score.Context; import score.DictDB; import java.math.BigInteger; import java.util.Arrays; +import icon.proto.core.channel.Channel; +import icon.proto.core.channel.Packet; +import icon.proto.core.client.Height; +import icon.proto.core.connection.ConnectionEnd; + public class IBCPacket extends IBCChannelHandshake { public void _sendPacket(Packet packet) { diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics05/port/ModuleManager.java b/contracts/javascore/ibc/src/main/java/ibc/ics05/port/ModuleManager.java index f58a48baf..411e39d38 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics05/port/ModuleManager.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics05/port/ModuleManager.java @@ -1,7 +1,7 @@ package ibc.ics05.port; -import ibc.icon.interfaces.IIBCModuleScoreInterface; import ibc.icon.score.util.StringUtil; +import icon.ibc.interfaces.IIBCModuleScoreInterface; import score.Address; /** diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Compress.java b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Compress.java index e93497da7..4fa907104 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Compress.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Compress.java @@ -1,6 +1,6 @@ package ibc.ics23.commitment; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; import score.Context; import scorex.util.ArrayList; import scorex.util.HashMap; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ics23.java b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ics23.java index adbb13a50..53e125aa2 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ics23.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ics23.java @@ -1,6 +1,6 @@ package ibc.ics23.commitment; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; import score.UserRevertedException; import scorex.util.ArrayList; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ops.java b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ops.java index ec000d5e8..f42db65cc 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ops.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Ops.java @@ -2,7 +2,7 @@ import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; import score.Context; import score.UserRevertedException; @@ -42,7 +42,7 @@ public static byte[] doHashOrNoop(int hashOp, byte[] preImage) { public static byte[] doHash(int hashOp, byte[] preImage) { if (hashOp == HashOp.SHA256) { return Context.hash("sha-256", preImage); - } else if (hashOp == HashOp.KECCAK) { + } else if (hashOp == HashOp.KECCAK256) { return Context.hash("keccak-256", preImage); } else if (hashOp == HashOp.RIPEMD160) { throw new UserRevertedException("RIPEMD160 hash not supported"); diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Proof.java b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Proof.java index d6cec969c..f91fc2d91 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Proof.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/Proof.java @@ -1,6 +1,6 @@ package ibc.ics23.commitment; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; import score.UserRevertedException; import java.math.BigInteger; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/types/Merkle.java b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/types/Merkle.java index 6b3308c34..802ba75af 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/types/Merkle.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics23/commitment/types/Merkle.java @@ -3,8 +3,8 @@ import ibc.icon.score.util.StringUtil; import ibc.ics23.commitment.Ics23; import ibc.ics23.commitment.Proof; -import icon.proto.clients.tendermint.MerkleRoot; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; +import ibc.core.commitment.v1.*; import score.UserRevertedException; import scorex.util.ArrayList; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics24/host/IBCStore.java b/contracts/javascore/ibc/src/main/java/ibc/ics24/host/IBCStore.java index ba067e754..d641338ff 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics24/host/IBCStore.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics24/host/IBCStore.java @@ -1,10 +1,10 @@ package ibc.ics24.host; -import ibc.icon.interfaces.IIBCHost; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.ILightClientScoreInterface; import ibc.icon.score.util.NullChecker; import ibc.ics05.port.ModuleManager; +import icon.ibc.interfaces.IIBCHost; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; import score.*; import score.annotation.External; import scorex.util.ArrayList; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandler.java b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandler.java index 62095082f..0036e25c6 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandler.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandler.java @@ -6,7 +6,7 @@ import java.math.BigInteger; -import ibc.icon.structs.messages.MsgCreateClient; +import icon.ibc.structs.messages.MsgCreateClient; public class IBCHandler extends IBCHandlerPacket { diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerChannel.java b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerChannel.java index 060233e43..f93035e5e 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerChannel.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerChannel.java @@ -2,10 +2,10 @@ import java.util.List; -import ibc.icon.interfaces.IIBCChannelHandshake; -import ibc.icon.interfaces.IIBCModuleScoreInterface; -import ibc.icon.structs.messages.*; import icon.proto.core.channel.Channel; +import icon.ibc.interfaces.IIBCChannelHandshake; +import icon.ibc.interfaces.IIBCModuleScoreInterface; +import icon.ibc.structs.messages.*; import score.annotation.EventLog; import score.annotation.External; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerClient.java b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerClient.java index f4d2a6b68..7e529f629 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerClient.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerClient.java @@ -1,9 +1,9 @@ package ibc.ics25.handler; -import ibc.icon.interfaces.IIBCClient; -import ibc.icon.structs.messages.MsgCreateClient; -import ibc.icon.structs.messages.MsgUpdateClient; import ibc.ics04.channel.IBCPacket; +import icon.ibc.interfaces.IIBCClient; +import icon.ibc.structs.messages.MsgCreateClient; +import icon.ibc.structs.messages.MsgUpdateClient; import score.annotation.EventLog; import score.annotation.External; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerConnection.java b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerConnection.java index 9ace8b9c6..0bb209dbf 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerConnection.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerConnection.java @@ -1,10 +1,10 @@ package ibc.ics25.handler; -import ibc.icon.interfaces.IIBCConnection; -import ibc.icon.structs.messages.MsgConnectionOpenAck; -import ibc.icon.structs.messages.MsgConnectionOpenConfirm; -import ibc.icon.structs.messages.MsgConnectionOpenInit; -import ibc.icon.structs.messages.MsgConnectionOpenTry; +import icon.ibc.interfaces.IIBCConnection; +import icon.ibc.structs.messages.MsgConnectionOpenAck; +import icon.ibc.structs.messages.MsgConnectionOpenConfirm; +import icon.ibc.structs.messages.MsgConnectionOpenInit; +import icon.ibc.structs.messages.MsgConnectionOpenTry; import score.annotation.EventLog; import score.annotation.External; diff --git a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerPacket.java b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerPacket.java index 42255d045..d58892ea0 100644 --- a/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerPacket.java +++ b/contracts/javascore/ibc/src/main/java/ibc/ics25/handler/IBCHandlerPacket.java @@ -2,13 +2,13 @@ import java.math.BigInteger; -import ibc.icon.interfaces.IIBCModule; -import ibc.icon.interfaces.IIBCPacket; -import ibc.icon.structs.messages.MsgPacketAcknowledgement; -import ibc.icon.structs.messages.MsgPacketRecv; -import ibc.icon.structs.messages.MsgPacketTimeout; -import ibc.icon.structs.messages.MsgRequestTimeoutPacket; import icon.proto.core.channel.Packet; +import icon.ibc.interfaces.IIBCModule; +import icon.ibc.interfaces.IIBCPacket; +import icon.ibc.structs.messages.MsgPacketAcknowledgement; +import icon.ibc.structs.messages.MsgPacketRecv; +import icon.ibc.structs.messages.MsgPacketTimeout; +import icon.ibc.structs.messages.MsgRequestTimeoutPacket; import score.Context; import score.annotation.EventLog; import score.annotation.External; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics02/client/ClientTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics02/client/ClientTest.java index 7a99947b9..5bd18f389 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics02/client/ClientTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics02/client/ClientTest.java @@ -4,11 +4,13 @@ import com.iconloop.score.test.Score; import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.ILightClientScoreInterface; -import ibc.icon.structs.messages.MsgCreateClient; -import ibc.icon.structs.messages.MsgUpdateClient; + import ibc.icon.test.MockContract; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; +import icon.ibc.structs.messages.MsgCreateClient; +import icon.ibc.structs.messages.MsgUpdateClient; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics03/connection/ConnectionTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics03/connection/ConnectionTest.java index bbad02fc2..68ae75048 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics03/connection/ConnectionTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics03/connection/ConnectionTest.java @@ -23,15 +23,15 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.ILightClientScoreInterface; import ibc.icon.score.util.ByteUtil; -import ibc.icon.structs.messages.MsgConnectionOpenAck; -import ibc.icon.structs.messages.MsgConnectionOpenConfirm; -import ibc.icon.structs.messages.MsgConnectionOpenInit; -import ibc.icon.structs.messages.MsgConnectionOpenTry; import ibc.icon.test.MockContract; import ibc.ics24.host.IBCCommitment; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; +import icon.ibc.structs.messages.MsgConnectionOpenAck; +import icon.ibc.structs.messages.MsgConnectionOpenConfirm; +import icon.ibc.structs.messages.MsgConnectionOpenInit; +import icon.ibc.structs.messages.MsgConnectionOpenTry; import score.Address; import test.proto.core.client.Client.Height; import test.proto.core.connection.Connection.ConnectionEnd; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/ChannelHandshakeTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/ChannelHandshakeTest.java index d3bf6632b..665967485 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/ChannelHandshakeTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/ChannelHandshakeTest.java @@ -22,18 +22,18 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.ILightClientScoreInterface; import ibc.icon.score.util.ByteUtil; -import ibc.icon.structs.messages.MsgChannelCloseConfirm; -import ibc.icon.structs.messages.MsgChannelCloseInit; -import ibc.icon.structs.messages.MsgChannelOpenAck; -import ibc.icon.structs.messages.MsgChannelOpenConfirm; -import ibc.icon.structs.messages.MsgChannelOpenInit; -import ibc.icon.structs.messages.MsgChannelOpenTry; import ibc.icon.test.MockContract; import ibc.ics03.connection.IBCConnection; import ibc.ics24.host.IBCCommitment; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; +import icon.ibc.structs.messages.MsgChannelCloseConfirm; +import icon.ibc.structs.messages.MsgChannelCloseInit; +import icon.ibc.structs.messages.MsgChannelOpenAck; +import icon.ibc.structs.messages.MsgChannelOpenConfirm; +import icon.ibc.structs.messages.MsgChannelOpenInit; +import icon.ibc.structs.messages.MsgChannelOpenTry; import score.Address; import test.proto.core.channel.ChannelOuterClass.Channel; import test.proto.core.channel.ChannelOuterClass.Channel.Counterparty; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/PacketTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/PacketTest.java index abf929dd1..d1715036f 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/PacketTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics04/channel/PacketTest.java @@ -18,7 +18,7 @@ import java.util.Map; import ibc.icon.score.util.Proto; -import ibc.icon.structs.messages.MsgRequestTimeoutPacket; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; @@ -28,19 +28,20 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.ILightClientScoreInterface; -import ibc.icon.score.util.ByteUtil; -import ibc.icon.test.MockContract; -import ibc.ics03.connection.IBCConnection; -import ibc.ics24.host.IBCCommitment; import icon.proto.core.channel.Channel; import icon.proto.core.channel.Packet; import icon.proto.core.client.Height; import icon.proto.core.connection.ConnectionEnd; import icon.proto.core.connection.Counterparty; -import icon.proto.core.connection.MerklePrefix; +import ibc.core.commitment.v1.MerklePrefix; import icon.proto.core.connection.Version; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.test.MockContract; +import ibc.ics03.connection.IBCConnection; +import ibc.ics24.host.IBCCommitment; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; +import icon.ibc.structs.messages.MsgRequestTimeoutPacket; import score.Address; public class PacketTest extends TestBase { diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/Ics23Test.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/Ics23Test.java index 4f8c004c6..09cb89405 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/Ics23Test.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/Ics23Test.java @@ -1,6 +1,6 @@ package ibc.ics23.commitment; -import icon.proto.core.commitment.CommitmentProof; +import cosmos.ics23.v1.*; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadOpsTestData.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadOpsTestData.java index 99cd8e131..b5ed886ee 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadOpsTestData.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadOpsTestData.java @@ -2,8 +2,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import icon.proto.core.commitment.InnerOp; -import icon.proto.core.commitment.LeafOp; +import cosmos.ics23.v1.*; import java.io.IOException; import java.io.InputStream; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadProofTestData.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadProofTestData.java index 9fd43bcd9..e7d25d94b 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadProofTestData.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadProofTestData.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import ibc.icon.score.util.ByteUtil; -import icon.proto.core.commitment.*; +import cosmos.ics23.v1.*; import java.io.IOException; import java.io.InputStream; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadVectorTestData.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadVectorTestData.java index 82d90b244..2e85dbe85 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadVectorTestData.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/LoadVectorTestData.java @@ -2,8 +2,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import icon.proto.core.commitment.CommitmentProof; -import icon.proto.core.commitment.ProofSpec; +import cosmos.ics23.v1.*; import java.io.IOException; import java.io.InputStream; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/ProofTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/ProofTest.java index 4616fa098..0ecc870d0 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/ProofTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/ProofTest.java @@ -1,6 +1,6 @@ package ibc.ics23.commitment; -import icon.proto.core.commitment.ProofSpec; +import cosmos.ics23.v1.*; import org.junit.jupiter.api.Test; import java.io.IOException; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/types/MerkleTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/types/MerkleTest.java index 635dfa11a..e957299ee 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/types/MerkleTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics23/commitment/types/MerkleTest.java @@ -2,9 +2,7 @@ import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.StringUtil; -import icon.proto.clients.tendermint.MerkleRoot; -import icon.proto.core.commitment.MerklePath; -import icon.proto.core.commitment.MerkleProof; +import ibc.core.commitment.v1.*; import score.Context; import org.junit.jupiter.api.Test; diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTest.java b/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTest.java index 71bf7524e..b14c93804 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTest.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTest.java @@ -1,7 +1,9 @@ package ibc.ics25.handler; import com.iconloop.score.test.Account; -import ibc.icon.structs.messages.*; + +import icon.ibc.structs.messages.*; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; @@ -101,14 +103,14 @@ void sendAndAckPacket() throws Exception { acknowledgePacket(); } - @Test + @Test @SuppressWarnings("unchecked") void ackResponse_checkAckHeightSaved() throws Exception{ establishCommunication(); receivePacket(); - Map ackHeights = (Map) handler.call("getAckHeights", portId, channelId, 0,10); + Map ackHeights = (Map) handler.call("getAckHeights", portId, channelId, 0,10); assertEquals( ackHeights.keySet().size(), 0); diff --git a/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTestBase.java b/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTestBase.java index c4a5ec11a..83bf08808 100644 --- a/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTestBase.java +++ b/contracts/javascore/ibc/src/test/java/ibc/ics25/handler/IBCHandlerTestBase.java @@ -21,13 +21,13 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.ILightClient; -import ibc.icon.interfaces.IIBCModule; -import ibc.icon.interfaces.IIBCModuleScoreInterface; -import ibc.icon.interfaces.ILightClientScoreInterface; -import ibc.icon.structs.messages.*; import ibc.icon.test.MockContract; import ibc.ics03.connection.IBCConnection; +import icon.ibc.interfaces.IIBCModule; +import icon.ibc.interfaces.IIBCModuleScoreInterface; +import icon.ibc.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClientScoreInterface; +import icon.ibc.structs.messages.*; import test.proto.core.channel.ChannelOuterClass.Channel; import test.proto.core.channel.ChannelOuterClass.Packet; import test.proto.core.client.Client.Height; diff --git a/contracts/javascore/lib/build.gradle b/contracts/javascore/lib/build.gradle index dab4546d2..e012a4829 100644 --- a/contracts/javascore/lib/build.gradle +++ b/contracts/javascore/lib/build.gradle @@ -14,13 +14,5 @@ dependencies { annotationProcessor("foundation.icon:javaee-score-client:$scoreClientVersion") compileOnly("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") compileOnly("foundation.icon:icon-sdk:$iconsdkVersion") - -// testImplementation("org.junit.jupiter:junit-jupiter-api:$jupiterApiVersion") -// testImplementation("org.junit.jupiter:junit-jupiter-params:$jupiterParamsVersion") -// testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$jupiterEngineVersion") -// testImplementation("foundation.icon:javaee-unittest:$javaeeUnittestVersion") } -//test { -// useJUnitPlatform() -//} diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/enums/clientstate/Status.java b/contracts/javascore/lib/src/main/java/icon/ibc/enums/clientstate/Status.java similarity index 66% rename from contracts/javascore/lib/src/main/java/ibc/icon/enums/clientstate/Status.java rename to contracts/javascore/lib/src/main/java/icon/ibc/enums/clientstate/Status.java index b1bf4548e..0af2f3d06 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/enums/clientstate/Status.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/enums/clientstate/Status.java @@ -1,4 +1,4 @@ -package ibc.icon.enums.clientstate; +package icon.ibc.enums.clientstate; public enum Status { Active, diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCChannelHandshake.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCChannelHandshake.java similarity index 97% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCChannelHandshake.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCChannelHandshake.java index d16a930f3..f9aa601c3 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCChannelHandshake.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCChannelHandshake.java @@ -1,7 +1,7 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import foundation.icon.score.client.ScoreClient; -import ibc.icon.structs.messages.*; +import icon.ibc.structs.messages.*; import score.annotation.EventLog; @ScoreClient diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCClient.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCClient.java similarity index 88% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCClient.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCClient.java index 354190bb1..a9bebbd3a 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCClient.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCClient.java @@ -1,8 +1,8 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import foundation.icon.score.client.ScoreClient; -import ibc.icon.structs.messages.MsgCreateClient; -import ibc.icon.structs.messages.MsgUpdateClient; +import icon.ibc.structs.messages.MsgCreateClient; +import icon.ibc.structs.messages.MsgUpdateClient; import score.Address; import score.annotation.EventLog; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCConnection.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCConnection.java similarity index 76% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCConnection.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCConnection.java index 42167352f..10e724baf 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCConnection.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCConnection.java @@ -1,10 +1,10 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import foundation.icon.score.client.ScoreClient; -import ibc.icon.structs.messages.MsgConnectionOpenAck; -import ibc.icon.structs.messages.MsgConnectionOpenConfirm; -import ibc.icon.structs.messages.MsgConnectionOpenInit; -import ibc.icon.structs.messages.MsgConnectionOpenTry; +import icon.ibc.structs.messages.MsgConnectionOpenAck; +import icon.ibc.structs.messages.MsgConnectionOpenConfirm; +import icon.ibc.structs.messages.MsgConnectionOpenInit; +import icon.ibc.structs.messages.MsgConnectionOpenTry; import score.annotation.EventLog; @ScoreClient @@ -14,7 +14,7 @@ public interface IIBCConnection { @EventLog(indexed = 1) public void ConnectionOpenTry(String clientId, String connectionId, byte[] counterparty); - + @EventLog(indexed = 1) public void ConnectionOpenAck(String connectionId, byte[] connection); diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHandler.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHandler.java similarity index 96% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHandler.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHandler.java index c48778c31..3a6b17310 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHandler.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHandler.java @@ -1,4 +1,4 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import java.math.BigInteger; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHost.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHost.java similarity index 98% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHost.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHost.java index 3dbd98529..70460d778 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCHost.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCHost.java @@ -1,4 +1,4 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import java.math.BigInteger; import java.util.List; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCModule.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCModule.java similarity index 99% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCModule.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCModule.java index ebf6ef794..0fdfe1544 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCModule.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCModule.java @@ -1,4 +1,4 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import foundation.icon.score.client.ScoreInterface; import score.Address; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCPacket.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCPacket.java similarity index 90% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCPacket.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCPacket.java index 649c27d5c..6c89e30fb 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/IIBCPacket.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/IIBCPacket.java @@ -1,12 +1,12 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; -import ibc.icon.structs.messages.MsgPacketAcknowledgement; -import ibc.icon.structs.messages.MsgPacketRecv; -import ibc.icon.structs.messages.MsgPacketTimeout; -import ibc.icon.structs.messages.MsgRequestTimeoutPacket; import score.annotation.EventLog; import foundation.icon.score.client.ScoreClient; +import icon.ibc.structs.messages.MsgPacketAcknowledgement; +import icon.ibc.structs.messages.MsgPacketRecv; +import icon.ibc.structs.messages.MsgPacketTimeout; +import icon.ibc.structs.messages.MsgRequestTimeoutPacket; @ScoreClient public interface IIBCPacket { diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/ILightClient.java b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/ILightClient.java similarity index 99% rename from contracts/javascore/lib/src/main/java/ibc/icon/interfaces/ILightClient.java rename to contracts/javascore/lib/src/main/java/icon/ibc/interfaces/ILightClient.java index 8cc814a9d..fdb9bc37f 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/interfaces/ILightClient.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/interfaces/ILightClient.java @@ -1,4 +1,4 @@ -package ibc.icon.interfaces; +package icon.ibc.interfaces; import foundation.icon.score.client.ScoreInterface; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseConfirm.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseConfirm.java similarity index 95% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseConfirm.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseConfirm.java index adbb1b05d..b34ebfb53 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseConfirm.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseConfirm.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelCloseConfirm { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseInit.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseInit.java similarity index 91% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseInit.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseInit.java index e3a6d753d..7a071d0fc 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelCloseInit.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelCloseInit.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelCloseInit { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenAck.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenAck.java similarity index 97% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenAck.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenAck.java index 8d5f4af34..b20e9a524 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenAck.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenAck.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelOpenAck { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenConfirm.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenConfirm.java similarity index 95% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenConfirm.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenConfirm.java index 5f7137e62..61126685c 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenConfirm.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenConfirm.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelOpenConfirm { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenInit.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenInit.java similarity index 91% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenInit.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenInit.java index 8440e443e..157302062 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenInit.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenInit.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelOpenInit { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenTry.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenTry.java similarity index 96% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenTry.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenTry.java index 7b27eaa89..13ca13928 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgChannelOpenTry.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgChannelOpenTry.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgChannelOpenTry { private String portId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenAck.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenAck.java similarity index 98% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenAck.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenAck.java index 217adfcde..37b6d91e7 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenAck.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenAck.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgConnectionOpenAck { private String connectionId; @@ -10,7 +10,7 @@ public class MsgConnectionOpenAck { private byte[] proofConsensus; // proof that chainB has stored ConsensusState of chainA on its client private byte[] proofHeight; // height that relayer conpublic classed proofTry private byte[] consensusHeight; // latest height of chainA that chainB has stored on its chainA client - + public String getConnectionId() { return connectionId; } @@ -66,6 +66,6 @@ public void setConsensusHeight(byte[] consensusHeight) { this.consensusHeight = consensusHeight; } - + } \ No newline at end of file diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenConfirm.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenConfirm.java similarity index 94% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenConfirm.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenConfirm.java index c8fb15ccd..9bebec791 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenConfirm.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenConfirm.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgConnectionOpenConfirm { private String connectionId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenInit.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenInit.java similarity index 95% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenInit.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenInit.java index b9f90d6b2..54fe5e954 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenInit.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenInit.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; import java.math.BigInteger; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenTry.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenTry.java similarity index 98% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenTry.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenTry.java index 0052bf290..751319182 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgConnectionOpenTry.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgConnectionOpenTry.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; import java.math.BigInteger; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgCreateClient.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgCreateClient.java similarity index 96% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgCreateClient.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgCreateClient.java index 70d5ad8d6..f6e3279f4 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgCreateClient.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgCreateClient.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgCreateClient { private String clientType; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketAcknowledgement.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketAcknowledgement.java similarity index 95% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketAcknowledgement.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketAcknowledgement.java index 1044ce43a..68a03b634 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketAcknowledgement.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketAcknowledgement.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgPacketAcknowledgement { private byte[] packet; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketRecv.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketRecv.java similarity index 94% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketRecv.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketRecv.java index 4883e6e20..b89b9a149 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketRecv.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketRecv.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgPacketRecv { private byte[] packet; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketTimeout.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketTimeout.java similarity index 95% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketTimeout.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketTimeout.java index 1a04c3683..aee46f024 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgPacketTimeout.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgPacketTimeout.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; import java.math.BigInteger; @@ -7,7 +7,7 @@ public class MsgPacketTimeout { private byte[] proof; private byte[] proofHeight; private BigInteger nextSequenceRecv; - + public byte[] getPacket() { return packet; } diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgRequestTimeoutPacket.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgRequestTimeoutPacket.java similarity index 94% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgRequestTimeoutPacket.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgRequestTimeoutPacket.java index e9938f694..8d97a33e2 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgRequestTimeoutPacket.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgRequestTimeoutPacket.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgRequestTimeoutPacket { private byte[] packet; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgUpdateClient.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgUpdateClient.java similarity index 92% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgUpdateClient.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgUpdateClient.java index 7d0f65143..d0a0719ab 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/MsgUpdateClient.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/MsgUpdateClient.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class MsgUpdateClient { private String clientId; diff --git a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/UpdateClientResponse.java b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/UpdateClientResponse.java similarity index 96% rename from contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/UpdateClientResponse.java rename to contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/UpdateClientResponse.java index cc7d31d3d..2718a03dd 100644 --- a/contracts/javascore/lib/src/main/java/ibc/icon/structs/messages/UpdateClientResponse.java +++ b/contracts/javascore/lib/src/main/java/icon/ibc/structs/messages/UpdateClientResponse.java @@ -1,4 +1,4 @@ -package ibc.icon.structs.messages; +package icon.ibc.structs.messages; public class UpdateClientResponse { // current client state @@ -8,7 +8,7 @@ public class UpdateClientResponse { // updated height private byte[] height; - + public UpdateClientResponse(byte[] clientStateCommitment, byte[] consensusStateCommitment, byte[] height) { this.clientStateCommitment = clientStateCommitment; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockIDFlag.java b/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockIDFlag.java deleted file mode 100644 index bca418fb0..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockIDFlag.java +++ /dev/null @@ -1,11 +0,0 @@ -package icon.proto.clients.tendermint; - -public class BlockIDFlag { - public static final int BLOCK_ID_FLAG_UNKNOWN = 0; - - public static final int BLOCK_ID_FLAG_ABSENT = 1; - - public static final int BLOCK_ID_FLAG_COMMIT = 2; - - public static final int BLOCK_ID_FLAG_NIL = 3; -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedMsgType.java b/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedMsgType.java deleted file mode 100644 index 92cb55e93..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedMsgType.java +++ /dev/null @@ -1,11 +0,0 @@ -package icon.proto.clients.tendermint; - -public class SignedMsgType { - public static final int SIGNED_MSG_TYPE_UNKNOWN = 0; - - public static final int SIGNED_MSG_TYPE_PREVOTE = 1; - - public static final int SIGNED_MSG_TYPE_PRECOMMIT = 2; - - public static final int SIGNED_MSG_TYPE_PROPOSAL = 32; -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/BlockUpdate.java b/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/BlockUpdate.java deleted file mode 100644 index 7ea6e7d4a..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/BlockUpdate.java +++ /dev/null @@ -1,43 +0,0 @@ -package icon.proto.icon.lightclient.v1; - -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Proto; -import ibc.icon.score.util.ProtoMessage; -import icon.proto.icon.types.v1.SignedHeader; - -public class BlockUpdate extends ProtoMessage { - private SignedHeader header = new SignedHeader(); - - public SignedHeader getHeader() { - return this.header; - } - - public void setHeader(SignedHeader header) { - this.header = header; - } - - public byte[] encode() { - return ByteUtil.join( - Proto.encode(1, this.header)); - } - - public static BlockUpdate decode(byte[] data) { - BlockUpdate obj = new BlockUpdate(); - int index = 0; - int order; - int length = data.length; - while (index < length) { - order = data[index] >> 3; - index++; - switch(order) { - case 1: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.header = SignedHeader.decode(resp.res); - break; - } - } - } - return obj; - } -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ClientState.java b/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ClientState.java deleted file mode 100644 index b32a67768..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ClientState.java +++ /dev/null @@ -1,130 +0,0 @@ -package icon.proto.icon.lightclient.v1; - -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Proto; -import ibc.icon.score.util.ProtoMessage; -import java.math.BigInteger; -import java.util.List; -import scorex.util.ArrayList; - -public class ClientState extends ProtoMessage { - private BigInteger trustingPeriod = BigInteger.ZERO; - - private BigInteger frozenHeight = BigInteger.ZERO; - - private BigInteger maxClockDrift = BigInteger.ZERO; - - private BigInteger latestHeight = BigInteger.ZERO; - - private byte[] networkSectionHash = new byte[0]; - - private List validators = new ArrayList<>(); - - public BigInteger getTrustingPeriod() { - return this.trustingPeriod; - } - - public void setTrustingPeriod(BigInteger trustingPeriod) { - this.trustingPeriod = trustingPeriod; - } - - public BigInteger getFrozenHeight() { - return this.frozenHeight; - } - - public void setFrozenHeight(BigInteger frozenHeight) { - this.frozenHeight = frozenHeight; - } - - public BigInteger getMaxClockDrift() { - return this.maxClockDrift; - } - - public void setMaxClockDrift(BigInteger maxClockDrift) { - this.maxClockDrift = maxClockDrift; - } - - public BigInteger getLatestHeight() { - return this.latestHeight; - } - - public void setLatestHeight(BigInteger latestHeight) { - this.latestHeight = latestHeight; - } - - public byte[] getNetworkSectionHash() { - return this.networkSectionHash; - } - - public void setNetworkSectionHash(byte[] networkSectionHash) { - this.networkSectionHash = networkSectionHash; - } - - public List getValidators() { - return this.validators; - } - - public void setValidators(List validators) { - this.validators = validators; - } - - public byte[] encode() { - return ByteUtil.join( - Proto.encode(1, this.trustingPeriod), - Proto.encode(2, this.frozenHeight), - Proto.encode(3, this.maxClockDrift), - Proto.encode(4, this.latestHeight), - Proto.encode(5, this.networkSectionHash), - Proto.encodeBytesArray(6, this.validators)); - } - - public static ClientState decode(byte[] data) { - ClientState obj = new ClientState(); - int index = 0; - int order; - int length = data.length; - while (index < length) { - order = data[index] >> 3; - index++; - switch(order) { - case 1: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.trustingPeriod = resp.res; - break; - } - case 2: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.frozenHeight = resp.res; - break; - } - case 3: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.maxClockDrift = resp.res; - break; - } - case 4: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.latestHeight = resp.res; - break; - } - case 5: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.networkSectionHash = resp.res; - break; - } - case 6: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.validators.add(resp.res); - break; - } - } - } - return obj; - } -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ConsensusState.java b/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ConsensusState.java deleted file mode 100644 index 5efd014fb..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/ConsensusState.java +++ /dev/null @@ -1,42 +0,0 @@ -package icon.proto.icon.lightclient.v1; - -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Proto; -import ibc.icon.score.util.ProtoMessage; - -public class ConsensusState extends ProtoMessage { - private byte[] messageRoot = new byte[0]; - - public byte[] getMessageRoot() { - return this.messageRoot; - } - - public void setMessageRoot(byte[] messageRoot) { - this.messageRoot = messageRoot; - } - - public byte[] encode() { - return ByteUtil.join( - Proto.encode(1, this.messageRoot)); - } - - public static ConsensusState decode(byte[] data) { - ConsensusState obj = new ConsensusState(); - int index = 0; - int order; - int length = data.length; - while (index < length) { - order = data[index] >> 3; - index++; - switch(order) { - case 1: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.messageRoot = resp.res; - break; - } - } - } - return obj; - } -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BTPHeader.java b/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BTPHeader.java deleted file mode 100644 index e23de057c..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BTPHeader.java +++ /dev/null @@ -1,198 +0,0 @@ -package icon.proto.icon.types.v1; - -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Proto; -import ibc.icon.score.util.ProtoMessage; -import java.math.BigInteger; -import java.util.List; -import scorex.util.ArrayList; - -public class BTPHeader extends ProtoMessage { - private BigInteger mainHeight = BigInteger.ZERO; - - private BigInteger round = BigInteger.ZERO; - - private byte[] nextProofContextHash = new byte[0]; - - private List networkSectionToRoot = new ArrayList<>(); - - private BigInteger networkId = BigInteger.ZERO; - - private BigInteger updateNumber = BigInteger.ZERO; - - private byte[] prevNetworkSectionHash = new byte[0]; - - private BigInteger messageCount = BigInteger.ZERO; - - private byte[] messageRoot = new byte[0]; - - private List nextvalidators = new ArrayList<>(); - - public BigInteger getMainHeight() { - return this.mainHeight; - } - - public void setMainHeight(BigInteger mainHeight) { - this.mainHeight = mainHeight; - } - - public BigInteger getRound() { - return this.round; - } - - public void setRound(BigInteger round) { - this.round = round; - } - - public byte[] getNextProofContextHash() { - return this.nextProofContextHash; - } - - public void setNextProofContextHash(byte[] nextProofContextHash) { - this.nextProofContextHash = nextProofContextHash; - } - - public List getNetworkSectionToRoot() { - return this.networkSectionToRoot; - } - - public void setNetworkSectionToRoot(List networkSectionToRoot) { - this.networkSectionToRoot = networkSectionToRoot; - } - - public BigInteger getNetworkId() { - return this.networkId; - } - - public void setNetworkId(BigInteger networkId) { - this.networkId = networkId; - } - - public BigInteger getUpdateNumber() { - return this.updateNumber; - } - - public void setUpdateNumber(BigInteger updateNumber) { - this.updateNumber = updateNumber; - } - - public byte[] getPrevNetworkSectionHash() { - return this.prevNetworkSectionHash; - } - - public void setPrevNetworkSectionHash(byte[] prevNetworkSectionHash) { - this.prevNetworkSectionHash = prevNetworkSectionHash; - } - - public BigInteger getMessageCount() { - return this.messageCount; - } - - public void setMessageCount(BigInteger messageCount) { - this.messageCount = messageCount; - } - - public byte[] getMessageRoot() { - return this.messageRoot; - } - - public void setMessageRoot(byte[] messageRoot) { - this.messageRoot = messageRoot; - } - - public List getNextvalidators() { - return this.nextvalidators; - } - - public void setNextvalidators(List nextvalidators) { - this.nextvalidators = nextvalidators; - } - - public byte[] encode() { - return ByteUtil.join( - Proto.encode(1, this.mainHeight), - Proto.encode(2, this.round), - Proto.encode(3, this.nextProofContextHash), - Proto.encodeMessageArray(4, this.networkSectionToRoot), - Proto.encode(5, this.networkId), - Proto.encode(6, this.updateNumber), - Proto.encode(7, this.prevNetworkSectionHash), - Proto.encode(8, this.messageCount), - Proto.encode(9, this.messageRoot), - Proto.encodeBytesArray(10, this.nextvalidators)); - } - - public static BTPHeader decode(byte[] data) { - BTPHeader obj = new BTPHeader(); - int index = 0; - int order; - int length = data.length; - while (index < length) { - order = data[index] >> 3; - index++; - switch(order) { - case 1: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.mainHeight = resp.res; - break; - } - case 2: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.round = resp.res; - break; - } - case 3: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.nextProofContextHash = resp.res; - break; - } - case 4: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.networkSectionToRoot.add(MerkleNode.decode(resp.res)); - break; - } - case 5: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.networkId = resp.res; - break; - } - case 6: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.updateNumber = resp.res; - break; - } - case 7: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.prevNetworkSectionHash = resp.res; - break; - } - case 8: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); - index = resp.index; - obj.messageCount = resp.res; - break; - } - case 9: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.messageRoot = resp.res; - break; - } - case 10: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.nextvalidators.add(resp.res); - break; - } - } - } - return obj; - } -} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedHeader.java b/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedHeader.java deleted file mode 100644 index dcbff035a..000000000 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedHeader.java +++ /dev/null @@ -1,61 +0,0 @@ -package icon.proto.icon.types.v1; - -import ibc.icon.score.util.ByteUtil; -import ibc.icon.score.util.Proto; -import ibc.icon.score.util.ProtoMessage; -import java.util.List; -import scorex.util.ArrayList; - -public class SignedHeader extends ProtoMessage { - private BTPHeader header = new BTPHeader(); - - private List signatures = new ArrayList<>(); - - public BTPHeader getHeader() { - return this.header; - } - - public void setHeader(BTPHeader header) { - this.header = header; - } - - public List getSignatures() { - return this.signatures; - } - - public void setSignatures(List signatures) { - this.signatures = signatures; - } - - public byte[] encode() { - return ByteUtil.join( - Proto.encode(1, this.header), - Proto.encodeBytesArray(2, this.signatures)); - } - - public static SignedHeader decode(byte[] data) { - SignedHeader obj = new SignedHeader(); - int index = 0; - int order; - int length = data.length; - while (index < length) { - order = data[index] >> 3; - index++; - switch(order) { - case 1: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.header = BTPHeader.decode(resp.res); - break; - } - case 2: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.signatures.add(resp.res); - break; - } - } - } - return obj; - } -} diff --git a/contracts/javascore/lightclients/mockclient/build.gradle b/contracts/javascore/lightclients/mockclient/build.gradle index 1816d5dd8..673979ff0 100644 --- a/contracts/javascore/lightclients/mockclient/build.gradle +++ b/contracts/javascore/lightclients/mockclient/build.gradle @@ -6,6 +6,7 @@ dependencies { implementation project(':lib') implementation project(':score-util') implementation project(':ibc') + implementation project(':proto-lib') testImplementation 'com.google.protobuf:protobuf-javalite:3.13.0' diff --git a/contracts/javascore/lightclients/mockclient/src/main/java/ibc/mockclient/MockClient.java b/contracts/javascore/lightclients/mockclient/src/main/java/ibc/mockclient/MockClient.java index e04cfa8a5..6753b0dec 100644 --- a/contracts/javascore/lightclients/mockclient/src/main/java/ibc/mockclient/MockClient.java +++ b/contracts/javascore/lightclients/mockclient/src/main/java/ibc/mockclient/MockClient.java @@ -3,13 +3,12 @@ import java.math.BigInteger; import java.util.Map; +import icon.proto.core.client.Height; import score.Address; import score.Context; import score.annotation.External; import score.annotation.Optional; -import ibc.icon.interfaces.ILightClient; -import icon.proto.core.client.Height; - +import icon.ibc.interfaces.ILightClient; import ibc.ics24.host.IBCCommitment; public class MockClient implements ILightClient { diff --git a/contracts/javascore/lightclients/tendermint/build.gradle b/contracts/javascore/lightclients/tendermint/build.gradle index 2f82fee7a..eedfc9ade 100644 --- a/contracts/javascore/lightclients/tendermint/build.gradle +++ b/contracts/javascore/lightclients/tendermint/build.gradle @@ -6,9 +6,11 @@ dependencies { implementation project(':lib') implementation project(':score-util') implementation project(':ibc') + implementation project(':proto-lib') testImplementation 'com.google.protobuf:protobuf-javalite:3.16.3' + testImplementation 'com.google.protobuf:protobuf-java-util:3.16.3' testImplementation 'foundation.icon:javaee-rt:0.9.3' testImplementation("org.mockito:mockito-core:$mockitoCoreVersion") testImplementation("org.mockito:mockito-inline:$mockitoCoreVersion") @@ -35,6 +37,7 @@ jacocoTestReport { dependsOn ':ibc:jacocoTestReport' dependsOn ':ibc:processTestResources' dependsOn ':lib:test' + dependsOn ':proto-lib:test' dependsOn ':mockapp:compileJava' dependsOn ':mockapp:test' dependsOn ':proto-util:compileJava' diff --git a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/Tendermint.java b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/Tendermint.java index 11f3aa8ff..7f2e99b63 100644 --- a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/Tendermint.java +++ b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/Tendermint.java @@ -4,7 +4,9 @@ import java.util.Arrays; import ibc.icon.score.util.Proto; -import icon.proto.clients.tendermint.*; +import tendermint.types.*; +import google.protobuf.*; +import ibc.lightclients.tendermint.v1.*; import score.Context; import static ibc.tendermint.TendermintHelper.*; @@ -256,7 +258,7 @@ protected byte[] voteSignBytes( String chainID, int idx) { - return toCanonicalVote(commit, idx, chainID).encode(); + return toCanonicalVote(commit, idx, chainID); } protected byte[] voteSignBytesDelim( diff --git a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintHelper.java b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintHelper.java index da7c287ea..1aa812492 100644 --- a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintHelper.java +++ b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintHelper.java @@ -5,40 +5,38 @@ import ibc.icon.score.util.MerkleTree; import ibc.icon.score.util.Proto; -import icon.proto.clients.tendermint.CanonicalVote; -import icon.proto.clients.tendermint.Commit; -import icon.proto.clients.tendermint.CommitSig; -import icon.proto.clients.tendermint.ConsensusState; -import icon.proto.clients.tendermint.Duration; -import icon.proto.clients.tendermint.LightHeader; -import icon.proto.clients.tendermint.MerkleRoot; -import icon.proto.clients.tendermint.SignedHeader; -import icon.proto.clients.tendermint.SignedMsgType; -import icon.proto.clients.tendermint.SimpleValidator; -import icon.proto.clients.tendermint.Timestamp; -import icon.proto.clients.tendermint.TmHeader; -import icon.proto.clients.tendermint.Validator; -import icon.proto.clients.tendermint.ValidatorSet; -import icon.proto.core.client.Height; +import ibc.icon.score.util.ByteUtil; +import tendermint.types.Commit; +import tendermint.types.CommitSig; +import ibc.lightclients.tendermint.v1.ConsensusState; +import tendermint.types.Header; +import ibc.core.commitment.v1.MerkleRoot; +import tendermint.types.SignedHeader; +import tendermint.types.SignedMsgType; +import tendermint.types.SimpleValidator; +import tendermint.types.Validator; +import tendermint.types.ValidatorSet; +import ibc.core.client.v1.Height; + +import google.protobuf.Timestamp; +import google.protobuf.Duration; import score.Context; public class TendermintHelper { public static final BigInteger MICRO_SECONDS_IN_A_SECOND = BigInteger.valueOf(1_000_000); - public static CanonicalVote toCanonicalVote(Commit commit, int valIdx, String chainId) { + public static byte[] toCanonicalVote(Commit commit, int valIdx, String chainId) { CommitSig commitSig = commit.getSignatures().get(valIdx); - CanonicalVote vote = new CanonicalVote(); - - vote.setType(SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT); - vote.setHeight(commit.getHeight()); - vote.setRound(commit.getRound()); - vote.setBlockId(commit.getBlockId()); - vote.setTimestamp(commitSig.getTimestamp()); - vote.setChainId(chainId); - return vote; + return ByteUtil.join( + Proto.encode(1, SignedMsgType.SIGNED_MSG_TYPE_PRECOMMIT), + Proto.encodeFixed64(2, commit.getHeight()), + Proto.encodeFixed64(3, commit.getRound()), + Proto.encode(4, commit.getBlockId()), + Proto.encode(5, commitSig.getTimestamp()), + Proto.encode(6, chainId)); } - public static ConsensusState toConsensusState(TmHeader header) { + public static ConsensusState toConsensusState(ibc.lightclients.tendermint.v1.Header header) { ConsensusState state = new ConsensusState(); state.setNextValidatorsHash(header.getSignedHeader().getHeader().getNextValidatorsHash()); state.setTimestamp(header.getSignedHeader().getHeader().getTime()); @@ -129,7 +127,7 @@ public static byte[] hash(ValidatorSet validatorSet) { return MerkleTree.merkleRootHash(data, 0, size); } - public static byte[] hash(LightHeader header) { + public static byte[] hash(Header header) { byte[] hbz = Proto.encode(1, header.getVersion().getBlock()); byte[] pbt = header.getTime().encode(); byte[] bzbi = header.getLastBlockId().encode(); diff --git a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintLightClient.java b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintLightClient.java index c52b57a79..2012a1057 100644 --- a/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintLightClient.java +++ b/contracts/javascore/lightclients/tendermint/src/main/java/ibc/tendermint/TendermintLightClient.java @@ -1,14 +1,17 @@ package ibc.tendermint; -import ibc.icon.interfaces.ILightClient; +import icon.ibc.interfaces.ILightClient; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.NullChecker; import ibc.icon.score.util.StringUtil; import ibc.ics23.commitment.types.Merkle; import ibc.ics24.host.IBCCommitment; -import icon.proto.clients.tendermint.*; -import icon.proto.core.client.Height; -import icon.proto.core.commitment.MerkleProof; +import cosmos.ics23.v1.*; +import google.protobuf.*; +import tendermint.types.*; +import ibc.core.commitment.v1.*; +import ibc.lightclients.tendermint.v1.*; +import ibc.core.client.v1.Height; import score.Address; import score.BranchDB; import score.Context; @@ -72,7 +75,7 @@ public byte[] getLatestHeight(String clientId) { byte[] encodedClientState = clientStates.get(clientId); NullChecker.requireNotNull(encodedClientState, "Client does not exist"); ClientState clientState = ClientState.decode(encodedClientState); - return newHeight(clientState.getLatestHeight()).encode(); + return clientState.getLatestHeight().encode(); } @External(readonly = true) @@ -101,12 +104,12 @@ public Map createClient(String clientId, byte[] clientStateBytes "trustLevel has zero Denominator"); clientStates.set(clientId, clientStateBytes); - consensusStates.at(clientId).set(clientState.getLatestHeight(), consensusStateBytes); + consensusStates.at(clientId).set(clientState.getLatestHeight().getRevisionHeight(), consensusStateBytes); return Map.of( "clientStateCommitment", IBCCommitment.keccak256(clientStateBytes), "consensusStateCommitment", IBCCommitment.keccak256(consensusStateBytes), - "height", newHeight(clientState.getLatestHeight()).encode()); + "height", clientState.getLatestHeight().encode()); } /** @@ -115,7 +118,7 @@ public Map createClient(String clientId, byte[] clientStateBytes @External public Map updateClient(String clientId, byte[] clientMessageBytes) { onlyHandler(); - TmHeader tmHeader = TmHeader.decode(clientMessageBytes); + ibc.lightclients.tendermint.v1.Header tmHeader = ibc.lightclients.tendermint.v1.Header.decode(clientMessageBytes); boolean conflictingHeader = false; // Check if the Client store already has a consensus state for the header's @@ -140,7 +143,7 @@ public Map updateClient(String clientId, byte[] clientMessageByt byte[] encodedClientState = clientStates.get(clientId); require(encodedClientState != null, "LC: client state is invalid"); ClientState clientState = ClientState.decode(encodedClientState); - byte[] encodedTrustedonsensusState = consensusStates.at(clientId).get(tmHeader.getTrustedHeight()); + byte[] encodedTrustedonsensusState = consensusStates.at(clientId).get(tmHeader.getTrustedHeight().getRevisionHeight()); require(encodedTrustedonsensusState != null, "LC: consensusState not found at trusted height"); ConsensusState trustedConsensusState = ConsensusState.decode(encodedTrustedonsensusState); @@ -150,12 +153,12 @@ public Map updateClient(String clientId, byte[] clientMessageByt // Header is different from existing consensus state and also valid, so freeze // the client and return if (conflictingHeader) { - clientState.setFrozenHeight(tmHeader.getSignedHeader().getHeader().getHeight()); + clientState.setFrozenHeight(newHeight(tmHeader.getSignedHeader().getHeader().getHeight())); encodedClientState = clientState.encode(); clientStates.set(clientId, encodedClientState); byte[] encodedConsensusState = toConsensusState(tmHeader).encode(); - consensusStates.at(clientId).set(clientState.getLatestHeight(), encodedConsensusState); + consensusStates.at(clientId).set(clientState.getLatestHeight().getRevisionHeight(), encodedConsensusState); processedHeights.at(clientId).set(tmHeader.getSignedHeader().getHeader().getHeight(), BigInteger.valueOf(Context.getBlockHeight())); processedTimes.at(clientId).set(tmHeader.getSignedHeader().getHeader().getHeight(), @@ -169,8 +172,8 @@ public Map updateClient(String clientId, byte[] clientMessageByt } // update the consensus state from a new header and set processed time metadata - if (tmHeader.getSignedHeader().getHeader().getHeight().compareTo(clientState.getLatestHeight()) > 0) { - clientState.setLatestHeight(tmHeader.getSignedHeader().getHeader().getHeight()); + if (tmHeader.getSignedHeader().getHeader().getHeight().compareTo(clientState.getLatestHeight().getRevisionHeight()) > 0) { + clientState.setLatestHeight(newHeight(tmHeader.getSignedHeader().getHeader().getHeight())); encodedClientState = clientState.encode(); clientStates.set(clientId, encodedClientState); } @@ -186,7 +189,7 @@ public Map updateClient(String clientId, byte[] clientMessageByt return Map.of( "clientStateCommitment", IBCCommitment.keccak256(encodedClientState), "consensusStateCommitment", IBCCommitment.keccak256(encodedConsensusState), - "height", newHeight(clientState.getLatestHeight()).encode()); + "height", clientState.getLatestHeight().encode()); } @External(readonly = true) @@ -249,17 +252,17 @@ public void verifyNonMembership( public void checkValidity( ClientState clientState, ConsensusState trustedConsensusState, - TmHeader tmHeader, + ibc.lightclients.tendermint.v1.Header tmHeader, Timestamp currentTime) { // assert header height is newer than consensus state require( tmHeader.getSignedHeader().getHeader().getHeight() - .compareTo(tmHeader.getTrustedHeight()) > 0, + .compareTo(tmHeader.getTrustedHeight().getRevisionHeight()) > 0, "LC: Trusted height is higher than untrusted header height"); - LightHeader lc = new LightHeader(); + tendermint.types.Header lc = new tendermint.types.Header(); lc.setChainId(clientState.getChainId()); - lc.setHeight(tmHeader.getTrustedHeight()); + lc.setHeight(tmHeader.getTrustedHeight().getRevisionHeight()); lc.setTime(trustedConsensusState.getTimestamp()); lc.setNextValidatorsHash(trustedConsensusState.getNextValidatorsHash()); @@ -287,10 +290,10 @@ public void checkValidity( } private void validateArgs(ClientState cs, BigInteger height, byte[] prefix, byte[] proof) { - Context.require(cs.getLatestHeight().compareTo(height) >= 0, + Context.require(cs.getLatestHeight().getRevisionHeight().compareTo(height) >= 0, "Latest height must be greater or equal to proof height"); - Context.require(cs.getFrozenHeight().equals(BigInteger.ZERO) || - cs.getFrozenHeight().compareTo(height) >= 0, + Context.require(cs.getFrozenHeight().getRevisionHeight().equals(BigInteger.ZERO) || + cs.getFrozenHeight().getRevisionHeight().compareTo(height) >= 0, "Client is Frozen"); Context.require(prefix.length > 0, "Prefix cant be empty"); Context.require(proof.length > 0, "Proof cant be empty"); diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTest.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTest.java index 47ea38a43..0fa6b2bd0 100644 --- a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTest.java +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTest.java @@ -9,19 +9,20 @@ import java.math.BigInteger; + +import com.google.protobuf.Timestamp; +import com.google.protobuf.Duration; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import ibc.tendermint.light.TendermintLight.ClientState; -import ibc.tendermint.light.TendermintLight.ConsensusState; -import ibc.tendermint.light.TendermintLight.Duration; -import ibc.tendermint.light.TendermintLight.Fraction; -import ibc.tendermint.light.TendermintLight.SignedHeader; -import icon.proto.clients.tendermint.Timestamp; -import icon.proto.clients.tendermint.TmHeader; -import icon.proto.core.client.Height; +import com.ibc.core.client.v1.Height; + import score.Address; +import com.ibc.lightclients.tendermint.v1.*; +import com.tendermint.types.*; + public class LightClientTest extends LightClientTestBase { @BeforeEach @@ -39,11 +40,11 @@ void createClient() throws Exception { // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getLatestHeight(), initialHeader.getHeader().getHeight()); + assertEquals(clientState.getLatestHeight().getRevisionHeight(), initialHeader.getHeader().getHeight()); assertEquals(clientState.getAllowUpdateAfterExpiry(), allowUpdateAfterExpiry); assertEquals(clientState.getAllowUpdateAfterMisbehaviour(), allowUpdateAfterMisbehaviour); assertEquals(clientState.getChainId(), initialHeader.getHeader().getChainId()); - assertEquals(clientState.getFrozenHeight(), 0); + assertEquals(clientState.getFrozenHeight(), Height.newBuilder().build()); assertEquals(clientState.getMaxClockDrift(), maxClockDrift); assertEquals(clientState.getTrustLevel(), trustLevel); assertEquals(clientState.getTrustingPeriod(), trustingPeriod); @@ -74,7 +75,7 @@ void update_NonAdjacentInOrder() throws Exception { // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getLatestHeight(), lastHeader.getHeader().getHeight()); + assertEquals(clientState.getLatestHeight().getRevisionHeight(), lastHeader.getHeader().getHeight()); assertConsensusState(parseSignedHeader(1)); assertConsensusState(parseSignedHeader(2)); assertConsensusState(lastHeader); @@ -92,7 +93,7 @@ void update_NonAdjacentOutOfOrder() throws Exception { // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getLatestHeight(), lastHeader.getHeader().getHeight()); + assertEquals(clientState.getLatestHeight().getRevisionHeight(), lastHeader.getHeader().getHeight()); assertConsensusState(parseSignedHeader(1)); assertConsensusState(parseSignedHeader(2)); assertConsensusState(lastHeader); @@ -111,7 +112,7 @@ void updateMultiValidator() throws Exception { // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getLatestHeight(), lastHeader.getHeader().getHeight()); + assertEquals(clientState.getLatestHeight().getRevisionHeight(), lastHeader.getHeader().getHeight()); assertConsensusState(parseSignedHeader(1)); assertConsensusState(parseSignedHeader(2)); assertConsensusState(lastHeader); @@ -130,7 +131,7 @@ void updateAdjacentBlocks() throws Exception { // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getLatestHeight(), lastHeader.getHeader().getHeight()); + assertEquals(clientState.getLatestHeight().getRevisionHeight(), lastHeader.getHeader().getHeight()); assertConsensusState(parseSignedHeader(1)); assertConsensusState(parseSignedHeader(2)); assertConsensusState(lastHeader); @@ -144,17 +145,17 @@ void updateConflictingHeader() throws Exception { initializeClient(1); updateClient(2, 1); doNothing().when(clientSpy).checkValidity( - any(icon.proto.clients.tendermint.ClientState.class), - any(icon.proto.clients.tendermint.ConsensusState.class), - any(TmHeader.class), - any(Timestamp.class)); + any(ibc.lightclients.tendermint.v1.ClientState.class), + any(ibc.lightclients.tendermint.v1.ConsensusState.class), + any(ibc.lightclients.tendermint.v1.Header.class), + any()); // Act updateClient(3, 1); // Assert ClientState clientState = getClientState(); - assertEquals(clientState.getFrozenHeight(), duplicatedHeader.getHeader().getHeight()); + assertEquals(clientState.getFrozenHeight().getRevisionHeight(), duplicatedHeader.getHeader().getHeight()); } @Test @@ -246,16 +247,14 @@ void getTimestampAtHeight() throws Exception { SignedHeader header1 = parseSignedHeader(1); SignedHeader header2 = parseSignedHeader(2); - Height height1 = new Height(); - height1.setRevisionHeight(BigInteger.valueOf(header1.getHeader().getHeight())); - Height height2 = new Height(); - height2.setRevisionHeight(BigInteger.valueOf(header2.getHeader().getHeight())); + Height height1 = Height.newBuilder().setRevisionHeight(header1.getHeader().getHeight()).build(); + Height height2 = Height.newBuilder().setRevisionHeight(header2.getHeader().getHeight()).build(); long expectedTime1 = header1.getHeader().getTime().getSeconds(); long expectedTime2 = header2.getHeader().getTime().getSeconds(); // Act - BigInteger t1 = (BigInteger) client.call("getTimestampAtHeight", clientId, height1.encode()); - BigInteger t2 = (BigInteger) client.call("getTimestampAtHeight", clientId, height2.encode()); + BigInteger t1 = (BigInteger) client.call("getTimestampAtHeight", clientId, height1.toByteArray()); + BigInteger t2 = (BigInteger) client.call("getTimestampAtHeight", clientId, height2.toByteArray()); // Assert assertEquals(expectedTime1, t1.longValue()); @@ -265,14 +264,13 @@ void getTimestampAtHeight() throws Exception { @Test void getTimestampAtHeight_noConsensusState() throws Exception { // Arrange - Height height = new Height(); - height.setRevisionHeight(BigInteger.ONE); + Height height = Height.newBuilder().setRevisionHeight(1).build(); String expectedErrorMessage = "height: " + height.getRevisionHeight() + " does not have a consensus state"; // Act & Assert AssertionError e = assertThrows(AssertionError.class, - () -> client.call("getTimestampAtHeight", clientId, height.encode())); + () -> client.call("getTimestampAtHeight", clientId, height.toByteArray())); assertTrue(e.getMessage().contains(expectedErrorMessage)); } @@ -282,22 +280,20 @@ void getLatestHeight() throws Exception { SignedHeader header1 = parseSignedHeader(1); SignedHeader header2 = parseSignedHeader(2); - Height height1 = new Height(); - height1.setRevisionHeight(BigInteger.valueOf(header1.getHeader().getHeight())); - Height height2 = new Height(); - height2.setRevisionHeight(BigInteger.valueOf(header2.getHeader().getHeight())); + Height height1 = Height.newBuilder().setRevisionHeight(header1.getHeader().getHeight()).build(); + Height height2 = Height.newBuilder().setRevisionHeight(header2.getHeader().getHeight()).build(); // Act initializeClient(1); // Assert - assertArrayEquals(height1.encode(), (byte[]) client.call("getLatestHeight", clientId)); + assertArrayEquals(height1.toByteArray(), (byte[]) client.call("getLatestHeight", clientId)); // Act updateClient(2, 1); // Assert - assertArrayEquals(height2.encode(), (byte[]) client.call("getLatestHeight", clientId)); + assertArrayEquals(height2.toByteArray(), (byte[]) client.call("getLatestHeight", clientId)); } @Test diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTestBase.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTestBase.java index 263ae91e5..612c5daac 100644 --- a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTestBase.java +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/LightClientTestBase.java @@ -8,7 +8,7 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; import foundation.icon.ee.util.Crypto; -import ibc.tendermint.light.TendermintLight.*; +import ibc.lightclients.tendermint.v1.*; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -40,11 +40,22 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.tendermint.light.TendermintLight.*; -import icon.proto.core.client.Height; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Duration; import score.Context; import foundation.icon.ee.util.Crypto; +import com.ibc.lightclients.tendermint.v1.*; +import com.ibc.lightclients.tendermint.v1.ConsensusState; +import com.ibc.lightclients.tendermint.v1.ClientState; +import com.ibc.lightclients.tendermint.v1.Header; +import com.tendermint.types.*; +import com.tendermint.crypto.*; +import com.ibc.lightclients.tendermint.v1.Fraction; +import com.ibc.core.client.v1.Height; +import com.ibc.core.commitment.v1.MerkleRoot; +import com.tendermint.version.Consensus; + import static org.mockito.Mockito.spy; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.mockito.Mockito.any; @@ -130,38 +141,38 @@ protected void teardown() { } protected void initializeClient(int blockOrder) throws Exception { - TmHeader tmHeader = TmHeader.newBuilder() + Header header = Header.newBuilder() .setSignedHeader(parseSignedHeader(blockOrder)) .setValidatorSet(parseValidatorSet(blockOrder)).build(); ClientState clientState = ClientState.newBuilder() - .setChainId(tmHeader.getSignedHeader().getHeader().getChainId()) + .setChainId(header.getSignedHeader().getHeader().getChainId()) .setTrustLevel(trustLevel) .setTrustingPeriod(trustingPeriod) .setMaxClockDrift(maxClockDrift) - .setLatestHeight(tmHeader.getSignedHeader().getHeader().getHeight()) + .setLatestHeight(Height.newBuilder().setRevisionHeight(header.getSignedHeader().getHeader().getHeight())) .setAllowUpdateAfterExpiry(allowUpdateAfterExpiry) .setAllowUpdateAfterMisbehaviour(allowUpdateAfterMisbehaviour).build(); MerkleRoot root = MerkleRoot.newBuilder() - .setHash(tmHeader.getSignedHeader().getHeader().getAppHash()).build(); + .setHash(header.getSignedHeader().getHeader().getAppHash()).build(); ConsensusState consensusState = ConsensusState.newBuilder() - .setTimestamp(tmHeader.getSignedHeader().getHeader().getTime()) + .setTimestamp(header.getSignedHeader().getHeader().getTime()) .setRoot(root) - .setNextValidatorsHash(tmHeader.getSignedHeader().getHeader().getNextValidatorsHash()).build(); + .setNextValidatorsHash(header.getSignedHeader().getHeader().getNextValidatorsHash()).build(); client.invoke(ibcHandler, "createClient", clientId, clientState.toByteArray(), consensusState.toByteArray(), new byte[0]); } protected void updateClient(int blockOrder, int referenceBlock) throws Exception { - TmHeader tmHeader = createHeader(blockOrder, referenceBlock); - client.invoke(ibcHandler, "updateClient", clientId, tmHeader.toByteArray()); + Header header = createHeader(blockOrder, referenceBlock); + client.invoke(ibcHandler, "updateClient", clientId, header.toByteArray()); } protected ConsensusState getConsensusState(Height height) throws Exception { - return ConsensusState.parseFrom((byte[]) client.call("getConsensusState", clientId, height.encode())); + return ConsensusState.parseFrom((byte[]) client.call("getConsensusState", clientId, height.toByteArray())); } protected ClientState getClientState() throws Exception { @@ -169,21 +180,20 @@ protected ClientState getClientState() throws Exception { } protected void assertConsensusState(SignedHeader header) throws Exception { - Height height = new Height(); - height.setRevisionHeight(BigInteger.valueOf(header.getHeader().getHeight())); + Height height = Height.newBuilder().setRevisionHeight(header.getHeader().getHeight()).build(); ConsensusState consensusState = getConsensusState(height); assertEquals(header.getHeader().getNextValidatorsHash(), consensusState.getNextValidatorsHash()); assertEquals(header.getHeader().getAppHash(), consensusState.getRoot().getHash()); assertEquals(header.getHeader().getTime(), consensusState.getTimestamp()); } - protected TmHeader createHeader(int blockOrder, int referenceBlock) throws Exception { - TmHeader tmHeader = TmHeader.newBuilder() + protected Header createHeader(int blockOrder, int referenceBlock) throws Exception { + Header header = Header.newBuilder() .setSignedHeader(parseSignedHeader(blockOrder)) .setValidatorSet(parseValidatorSet(blockOrder)) - .setTrustedHeight(parseSignedHeader(referenceBlock).getHeader().getHeight()) + .setTrustedHeight(Height.newBuilder().setRevisionHeight(parseSignedHeader(referenceBlock).getHeader().getHeight())) .setTrustedValidators(parseValidatorSet(referenceBlock)).build(); - return tmHeader; + return header; } protected SignedHeader parseSignedHeader(int blockOrder) throws Exception { @@ -198,7 +208,7 @@ protected SignedHeader parseSignedHeader(int blockOrder) throws Exception { Consensus version = Consensus.newBuilder() .setBlock(jsonHeader.get("version").get("block").asInt()).build(); - LightHeader lightHeader = LightHeader.newBuilder() + com.tendermint.types.Header lightHeader = com.tendermint.types.Header.newBuilder() .setVersion(version) .setChainId(jsonHeader.get("chain_id").asText()) .setHeight(jsonHeader.get("height").asInt()) diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/light/TendermintLight.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/light/TendermintLight.java deleted file mode 100644 index 2ecc57971..000000000 --- a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/light/TendermintLight.java +++ /dev/null @@ -1,11972 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: proto/clients/tendermint/TendermintLight.proto - -package ibc.tendermint.light; - -public final class TendermintLight { - private TendermintLight() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - /** - * Protobuf enum {@code ibc.tendermint.light.BlockIDFlag} - */ - public enum BlockIDFlag - implements com.google.protobuf.Internal.EnumLite { - /** - * BLOCK_ID_FLAG_UNKNOWN = 0; - */ - BLOCK_ID_FLAG_UNKNOWN(0), - /** - * BLOCK_ID_FLAG_ABSENT = 1; - */ - BLOCK_ID_FLAG_ABSENT(1), - /** - * BLOCK_ID_FLAG_COMMIT = 2; - */ - BLOCK_ID_FLAG_COMMIT(2), - /** - * BLOCK_ID_FLAG_NIL = 3; - */ - BLOCK_ID_FLAG_NIL(3), - UNRECOGNIZED(-1), - ; - - /** - * BLOCK_ID_FLAG_UNKNOWN = 0; - */ - public static final int BLOCK_ID_FLAG_UNKNOWN_VALUE = 0; - /** - * BLOCK_ID_FLAG_ABSENT = 1; - */ - public static final int BLOCK_ID_FLAG_ABSENT_VALUE = 1; - /** - * BLOCK_ID_FLAG_COMMIT = 2; - */ - public static final int BLOCK_ID_FLAG_COMMIT_VALUE = 2; - /** - * BLOCK_ID_FLAG_NIL = 3; - */ - public static final int BLOCK_ID_FLAG_NIL_VALUE = 3; - - - @java.lang.Override - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BlockIDFlag valueOf(int value) { - return forNumber(value); - } - - public static BlockIDFlag forNumber(int value) { - switch (value) { - case 0: return BLOCK_ID_FLAG_UNKNOWN; - case 1: return BLOCK_ID_FLAG_ABSENT; - case 2: return BLOCK_ID_FLAG_COMMIT; - case 3: return BLOCK_ID_FLAG_NIL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BlockIDFlag> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - @java.lang.Override - public BlockIDFlag findValueByNumber(int number) { - return BlockIDFlag.forNumber(number); - } - }; - - public static com.google.protobuf.Internal.EnumVerifier - internalGetVerifier() { - return BlockIDFlagVerifier.INSTANCE; - } - - private static final class BlockIDFlagVerifier implements - com.google.protobuf.Internal.EnumVerifier { - static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new BlockIDFlagVerifier(); - @java.lang.Override - public boolean isInRange(int number) { - return BlockIDFlag.forNumber(number) != null; - } - }; - - private final int value; - - private BlockIDFlag(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:ibc.tendermint.light.BlockIDFlag) - } - - /** - * Protobuf enum {@code ibc.tendermint.light.SignedMsgType} - */ - public enum SignedMsgType - implements com.google.protobuf.Internal.EnumLite { - /** - * SIGNED_MSG_TYPE_UNKNOWN = 0; - */ - SIGNED_MSG_TYPE_UNKNOWN(0), - /** - *
-     * Votes
-     * 
- * - * SIGNED_MSG_TYPE_PREVOTE = 1; - */ - SIGNED_MSG_TYPE_PREVOTE(1), - /** - * SIGNED_MSG_TYPE_PRECOMMIT = 2; - */ - SIGNED_MSG_TYPE_PRECOMMIT(2), - /** - *
-     * Proposals
-     * 
- * - * SIGNED_MSG_TYPE_PROPOSAL = 32; - */ - SIGNED_MSG_TYPE_PROPOSAL(32), - UNRECOGNIZED(-1), - ; - - /** - * SIGNED_MSG_TYPE_UNKNOWN = 0; - */ - public static final int SIGNED_MSG_TYPE_UNKNOWN_VALUE = 0; - /** - *
-     * Votes
-     * 
- * - * SIGNED_MSG_TYPE_PREVOTE = 1; - */ - public static final int SIGNED_MSG_TYPE_PREVOTE_VALUE = 1; - /** - * SIGNED_MSG_TYPE_PRECOMMIT = 2; - */ - public static final int SIGNED_MSG_TYPE_PRECOMMIT_VALUE = 2; - /** - *
-     * Proposals
-     * 
- * - * SIGNED_MSG_TYPE_PROPOSAL = 32; - */ - public static final int SIGNED_MSG_TYPE_PROPOSAL_VALUE = 32; - - - @java.lang.Override - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SignedMsgType valueOf(int value) { - return forNumber(value); - } - - public static SignedMsgType forNumber(int value) { - switch (value) { - case 0: return SIGNED_MSG_TYPE_UNKNOWN; - case 1: return SIGNED_MSG_TYPE_PREVOTE; - case 2: return SIGNED_MSG_TYPE_PRECOMMIT; - case 32: return SIGNED_MSG_TYPE_PROPOSAL; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - SignedMsgType> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - @java.lang.Override - public SignedMsgType findValueByNumber(int number) { - return SignedMsgType.forNumber(number); - } - }; - - public static com.google.protobuf.Internal.EnumVerifier - internalGetVerifier() { - return SignedMsgTypeVerifier.INSTANCE; - } - - private static final class SignedMsgTypeVerifier implements - com.google.protobuf.Internal.EnumVerifier { - static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new SignedMsgTypeVerifier(); - @java.lang.Override - public boolean isInRange(int number) { - return SignedMsgType.forNumber(number) != null; - } - }; - - private final int value; - - private SignedMsgType(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:ibc.tendermint.light.SignedMsgType) - } - - public interface FractionOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Fraction) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * uint64 numerator = 1; - * @return The numerator. - */ - long getNumerator(); - - /** - * uint64 denominator = 2; - * @return The denominator. - */ - long getDenominator(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Fraction} - */ - public static final class Fraction extends - com.google.protobuf.GeneratedMessageLite< - Fraction, Fraction.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Fraction) - FractionOrBuilder { - private Fraction() { - } - public static final int NUMERATOR_FIELD_NUMBER = 1; - private long numerator_; - /** - * uint64 numerator = 1; - * @return The numerator. - */ - @java.lang.Override - public long getNumerator() { - return numerator_; - } - /** - * uint64 numerator = 1; - * @param value The numerator to set. - */ - private void setNumerator(long value) { - - numerator_ = value; - } - /** - * uint64 numerator = 1; - */ - private void clearNumerator() { - - numerator_ = 0L; - } - - public static final int DENOMINATOR_FIELD_NUMBER = 2; - private long denominator_; - /** - * uint64 denominator = 2; - * @return The denominator. - */ - @java.lang.Override - public long getDenominator() { - return denominator_; - } - /** - * uint64 denominator = 2; - * @param value The denominator to set. - */ - private void setDenominator(long value) { - - denominator_ = value; - } - /** - * uint64 denominator = 2; - */ - private void clearDenominator() { - - denominator_ = 0L; - } - - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Fraction parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Fraction prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Fraction} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Fraction, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Fraction) - ibc.tendermint.light.TendermintLight.FractionOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Fraction.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * uint64 numerator = 1; - * @return The numerator. - */ - @java.lang.Override - public long getNumerator() { - return instance.getNumerator(); - } - /** - * uint64 numerator = 1; - * @param value The numerator to set. - * @return This builder for chaining. - */ - public Builder setNumerator(long value) { - copyOnWrite(); - instance.setNumerator(value); - return this; - } - /** - * uint64 numerator = 1; - * @return This builder for chaining. - */ - public Builder clearNumerator() { - copyOnWrite(); - instance.clearNumerator(); - return this; - } - - /** - * uint64 denominator = 2; - * @return The denominator. - */ - @java.lang.Override - public long getDenominator() { - return instance.getDenominator(); - } - /** - * uint64 denominator = 2; - * @param value The denominator to set. - * @return This builder for chaining. - */ - public Builder setDenominator(long value) { - copyOnWrite(); - instance.setDenominator(value); - return this; - } - /** - * uint64 denominator = 2; - * @return This builder for chaining. - */ - public Builder clearDenominator() { - copyOnWrite(); - instance.clearDenominator(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Fraction) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Fraction(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "numerator_", - "denominator_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Fraction.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Fraction) - private static final ibc.tendermint.light.TendermintLight.Fraction DEFAULT_INSTANCE; - static { - Fraction defaultInstance = new Fraction(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Fraction.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Fraction getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface DurationOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Duration) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * int64 seconds = 1; - * @return The seconds. - */ - long getSeconds(); - - /** - * int32 nanos = 2; - * @return The nanos. - */ - int getNanos(); - } - /** - *
-   * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp
-   * 
- * - * Protobuf type {@code ibc.tendermint.light.Duration} - */ - public static final class Duration extends - com.google.protobuf.GeneratedMessageLite< - Duration, Duration.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Duration) - DurationOrBuilder { - private Duration() { - } - public static final int SECONDS_FIELD_NUMBER = 1; - private long seconds_; - /** - * int64 seconds = 1; - * @return The seconds. - */ - @java.lang.Override - public long getSeconds() { - return seconds_; - } - /** - * int64 seconds = 1; - * @param value The seconds to set. - */ - private void setSeconds(long value) { - - seconds_ = value; - } - /** - * int64 seconds = 1; - */ - private void clearSeconds() { - - seconds_ = 0L; - } - - public static final int NANOS_FIELD_NUMBER = 2; - private int nanos_; - /** - * int32 nanos = 2; - * @return The nanos. - */ - @java.lang.Override - public int getNanos() { - return nanos_; - } - /** - * int32 nanos = 2; - * @param value The nanos to set. - */ - private void setNanos(int value) { - - nanos_ = value; - } - /** - * int32 nanos = 2; - */ - private void clearNanos() { - - nanos_ = 0; - } - - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Duration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Duration parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Duration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Duration prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp
-     * 
- * - * Protobuf type {@code ibc.tendermint.light.Duration} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Duration, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Duration) - ibc.tendermint.light.TendermintLight.DurationOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Duration.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * int64 seconds = 1; - * @return The seconds. - */ - @java.lang.Override - public long getSeconds() { - return instance.getSeconds(); - } - /** - * int64 seconds = 1; - * @param value The seconds to set. - * @return This builder for chaining. - */ - public Builder setSeconds(long value) { - copyOnWrite(); - instance.setSeconds(value); - return this; - } - /** - * int64 seconds = 1; - * @return This builder for chaining. - */ - public Builder clearSeconds() { - copyOnWrite(); - instance.clearSeconds(); - return this; - } - - /** - * int32 nanos = 2; - * @return The nanos. - */ - @java.lang.Override - public int getNanos() { - return instance.getNanos(); - } - /** - * int32 nanos = 2; - * @param value The nanos to set. - * @return This builder for chaining. - */ - public Builder setNanos(int value) { - copyOnWrite(); - instance.setNanos(value); - return this; - } - /** - * int32 nanos = 2; - * @return This builder for chaining. - */ - public Builder clearNanos() { - copyOnWrite(); - instance.clearNanos(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Duration) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Duration(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "seconds_", - "nanos_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0002\u0002\u0004" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Duration.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Duration) - private static final ibc.tendermint.light.TendermintLight.Duration DEFAULT_INSTANCE; - static { - Duration defaultInstance = new Duration(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Duration.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Duration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ConsensusOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Consensus) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * uint64 block = 1; - * @return The block. - */ - long getBlock(); - - /** - * uint64 app = 2; - * @return The app. - */ - long getApp(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Consensus} - */ - public static final class Consensus extends - com.google.protobuf.GeneratedMessageLite< - Consensus, Consensus.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Consensus) - ConsensusOrBuilder { - private Consensus() { - } - public static final int BLOCK_FIELD_NUMBER = 1; - private long block_; - /** - * uint64 block = 1; - * @return The block. - */ - @java.lang.Override - public long getBlock() { - return block_; - } - /** - * uint64 block = 1; - * @param value The block to set. - */ - private void setBlock(long value) { - - block_ = value; - } - /** - * uint64 block = 1; - */ - private void clearBlock() { - - block_ = 0L; - } - - public static final int APP_FIELD_NUMBER = 2; - private long app_; - /** - * uint64 app = 2; - * @return The app. - */ - @java.lang.Override - public long getApp() { - return app_; - } - /** - * uint64 app = 2; - * @param value The app to set. - */ - private void setApp(long value) { - - app_ = value; - } - /** - * uint64 app = 2; - */ - private void clearApp() { - - app_ = 0L; - } - - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Consensus parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Consensus prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Consensus} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Consensus, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Consensus) - ibc.tendermint.light.TendermintLight.ConsensusOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Consensus.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * uint64 block = 1; - * @return The block. - */ - @java.lang.Override - public long getBlock() { - return instance.getBlock(); - } - /** - * uint64 block = 1; - * @param value The block to set. - * @return This builder for chaining. - */ - public Builder setBlock(long value) { - copyOnWrite(); - instance.setBlock(value); - return this; - } - /** - * uint64 block = 1; - * @return This builder for chaining. - */ - public Builder clearBlock() { - copyOnWrite(); - instance.clearBlock(); - return this; - } - - /** - * uint64 app = 2; - * @return The app. - */ - @java.lang.Override - public long getApp() { - return instance.getApp(); - } - /** - * uint64 app = 2; - * @param value The app to set. - * @return This builder for chaining. - */ - public Builder setApp(long value) { - copyOnWrite(); - instance.setApp(value); - return this; - } - /** - * uint64 app = 2; - * @return This builder for chaining. - */ - public Builder clearApp() { - copyOnWrite(); - instance.clearApp(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Consensus) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Consensus(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "block_", - "app_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Consensus.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Consensus) - private static final ibc.tendermint.light.TendermintLight.Consensus DEFAULT_INSTANCE; - static { - Consensus defaultInstance = new Consensus(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Consensus.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Consensus getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ClientStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.ClientState) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * string chain_id = 1; - * @return The chainId. - */ - java.lang.String getChainId(); - /** - * string chain_id = 1; - * @return The bytes for chainId. - */ - com.google.protobuf.ByteString - getChainIdBytes(); - - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - * @return Whether the trustLevel field is set. - */ - boolean hasTrustLevel(); - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - * @return The trustLevel. - */ - ibc.tendermint.light.TendermintLight.Fraction getTrustLevel(); - - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - * @return Whether the trustingPeriod field is set. - */ - boolean hasTrustingPeriod(); - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - * @return The trustingPeriod. - */ - ibc.tendermint.light.TendermintLight.Duration getTrustingPeriod(); - - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - * @return Whether the unbondingPeriod field is set. - */ - boolean hasUnbondingPeriod(); - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - * @return The unbondingPeriod. - */ - ibc.tendermint.light.TendermintLight.Duration getUnbondingPeriod(); - - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - * @return Whether the maxClockDrift field is set. - */ - boolean hasMaxClockDrift(); - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - * @return The maxClockDrift. - */ - ibc.tendermint.light.TendermintLight.Duration getMaxClockDrift(); - - /** - *
-     * Block height when the client was frozen due to a misbehaviour
-     *ibc.core.client.v1.Height frozen_height = 6;
-     * 
- * - * int64 frozen_height = 6; - * @return The frozenHeight. - */ - long getFrozenHeight(); - - /** - *
-     * Latest height the client was updated to
-     * 
- * - * int64 latest_height = 7; - * @return The latestHeight. - */ - long getLatestHeight(); - - /** - *
-     * This flag, when set to true, will allow governance to recover a client
-     * which has expired
-     * 
- * - * bool allow_update_after_expiry = 8; - * @return The allowUpdateAfterExpiry. - */ - boolean getAllowUpdateAfterExpiry(); - - /** - *
-     * This flag, when set to true, will allow governance to unfreeze a client
-     * whose chain has experienced a misbehaviour event
-     * 
- * - * bool allow_update_after_misbehaviour = 9; - * @return The allowUpdateAfterMisbehaviour. - */ - boolean getAllowUpdateAfterMisbehaviour(); - } - /** - * Protobuf type {@code ibc.tendermint.light.ClientState} - */ - public static final class ClientState extends - com.google.protobuf.GeneratedMessageLite< - ClientState, ClientState.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.ClientState) - ClientStateOrBuilder { - private ClientState() { - chainId_ = ""; - } - public static final int CHAIN_ID_FIELD_NUMBER = 1; - private java.lang.String chainId_; - /** - * string chain_id = 1; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return chainId_; - } - /** - * string chain_id = 1; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return com.google.protobuf.ByteString.copyFromUtf8(chainId_); - } - /** - * string chain_id = 1; - * @param value The chainId to set. - */ - private void setChainId( - java.lang.String value) { - java.lang.Class valueClass = value.getClass(); - - chainId_ = value; - } - /** - * string chain_id = 1; - */ - private void clearChainId() { - - chainId_ = getDefaultInstance().getChainId(); - } - /** - * string chain_id = 1; - * @param value The bytes for chainId to set. - */ - private void setChainIdBytes( - com.google.protobuf.ByteString value) { - checkByteStringIsUtf8(value); - chainId_ = value.toStringUtf8(); - - } - - public static final int TRUST_LEVEL_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.Fraction trustLevel_; - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - @java.lang.Override - public boolean hasTrustLevel() { - return trustLevel_ != null; - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Fraction getTrustLevel() { - return trustLevel_ == null ? ibc.tendermint.light.TendermintLight.Fraction.getDefaultInstance() : trustLevel_; - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - private void setTrustLevel(ibc.tendermint.light.TendermintLight.Fraction value) { - value.getClass(); - trustLevel_ = value; - - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTrustLevel(ibc.tendermint.light.TendermintLight.Fraction value) { - value.getClass(); - if (trustLevel_ != null && - trustLevel_ != ibc.tendermint.light.TendermintLight.Fraction.getDefaultInstance()) { - trustLevel_ = - ibc.tendermint.light.TendermintLight.Fraction.newBuilder(trustLevel_).mergeFrom(value).buildPartial(); - } else { - trustLevel_ = value; - } - - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - private void clearTrustLevel() { trustLevel_ = null; - - } - - public static final int TRUSTING_PERIOD_FIELD_NUMBER = 3; - private ibc.tendermint.light.TendermintLight.Duration trustingPeriod_; - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - @java.lang.Override - public boolean hasTrustingPeriod() { - return trustingPeriod_ != null; - } - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getTrustingPeriod() { - return trustingPeriod_ == null ? ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance() : trustingPeriod_; - } - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - private void setTrustingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - trustingPeriod_ = value; - - } - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTrustingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - if (trustingPeriod_ != null && - trustingPeriod_ != ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance()) { - trustingPeriod_ = - ibc.tendermint.light.TendermintLight.Duration.newBuilder(trustingPeriod_).mergeFrom(value).buildPartial(); - } else { - trustingPeriod_ = value; - } - - } - /** - *
-     * duration of the period since the LastestTimestamp during which the
-     * submitted headers are valid for upgrade
-     * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - private void clearTrustingPeriod() { trustingPeriod_ = null; - - } - - public static final int UNBONDING_PERIOD_FIELD_NUMBER = 4; - private ibc.tendermint.light.TendermintLight.Duration unbondingPeriod_; - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - @java.lang.Override - public boolean hasUnbondingPeriod() { - return unbondingPeriod_ != null; - } - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getUnbondingPeriod() { - return unbondingPeriod_ == null ? ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance() : unbondingPeriod_; - } - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - private void setUnbondingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - unbondingPeriod_ = value; - - } - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeUnbondingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - if (unbondingPeriod_ != null && - unbondingPeriod_ != ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance()) { - unbondingPeriod_ = - ibc.tendermint.light.TendermintLight.Duration.newBuilder(unbondingPeriod_).mergeFrom(value).buildPartial(); - } else { - unbondingPeriod_ = value; - } - - } - /** - *
-     * duration of the staking unbonding period
-     * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - private void clearUnbondingPeriod() { unbondingPeriod_ = null; - - } - - public static final int MAX_CLOCK_DRIFT_FIELD_NUMBER = 5; - private ibc.tendermint.light.TendermintLight.Duration maxClockDrift_; - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - @java.lang.Override - public boolean hasMaxClockDrift() { - return maxClockDrift_ != null; - } - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getMaxClockDrift() { - return maxClockDrift_ == null ? ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance() : maxClockDrift_; - } - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - private void setMaxClockDrift(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - maxClockDrift_ = value; - - } - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeMaxClockDrift(ibc.tendermint.light.TendermintLight.Duration value) { - value.getClass(); - if (maxClockDrift_ != null && - maxClockDrift_ != ibc.tendermint.light.TendermintLight.Duration.getDefaultInstance()) { - maxClockDrift_ = - ibc.tendermint.light.TendermintLight.Duration.newBuilder(maxClockDrift_).mergeFrom(value).buildPartial(); - } else { - maxClockDrift_ = value; - } - - } - /** - *
-     * defines how much new (untrusted) header's Time can drift into the future.
-     * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - private void clearMaxClockDrift() { maxClockDrift_ = null; - - } - - public static final int FROZEN_HEIGHT_FIELD_NUMBER = 6; - private long frozenHeight_; - /** - *
-     * Block height when the client was frozen due to a misbehaviour
-     *ibc.core.client.v1.Height frozen_height = 6;
-     * 
- * - * int64 frozen_height = 6; - * @return The frozenHeight. - */ - @java.lang.Override - public long getFrozenHeight() { - return frozenHeight_; - } - /** - *
-     * Block height when the client was frozen due to a misbehaviour
-     *ibc.core.client.v1.Height frozen_height = 6;
-     * 
- * - * int64 frozen_height = 6; - * @param value The frozenHeight to set. - */ - private void setFrozenHeight(long value) { - - frozenHeight_ = value; - } - /** - *
-     * Block height when the client was frozen due to a misbehaviour
-     *ibc.core.client.v1.Height frozen_height = 6;
-     * 
- * - * int64 frozen_height = 6; - */ - private void clearFrozenHeight() { - - frozenHeight_ = 0L; - } - - public static final int LATEST_HEIGHT_FIELD_NUMBER = 7; - private long latestHeight_; - /** - *
-     * Latest height the client was updated to
-     * 
- * - * int64 latest_height = 7; - * @return The latestHeight. - */ - @java.lang.Override - public long getLatestHeight() { - return latestHeight_; - } - /** - *
-     * Latest height the client was updated to
-     * 
- * - * int64 latest_height = 7; - * @param value The latestHeight to set. - */ - private void setLatestHeight(long value) { - - latestHeight_ = value; - } - /** - *
-     * Latest height the client was updated to
-     * 
- * - * int64 latest_height = 7; - */ - private void clearLatestHeight() { - - latestHeight_ = 0L; - } - - public static final int ALLOW_UPDATE_AFTER_EXPIRY_FIELD_NUMBER = 8; - private boolean allowUpdateAfterExpiry_; - /** - *
-     * This flag, when set to true, will allow governance to recover a client
-     * which has expired
-     * 
- * - * bool allow_update_after_expiry = 8; - * @return The allowUpdateAfterExpiry. - */ - @java.lang.Override - public boolean getAllowUpdateAfterExpiry() { - return allowUpdateAfterExpiry_; - } - /** - *
-     * This flag, when set to true, will allow governance to recover a client
-     * which has expired
-     * 
- * - * bool allow_update_after_expiry = 8; - * @param value The allowUpdateAfterExpiry to set. - */ - private void setAllowUpdateAfterExpiry(boolean value) { - - allowUpdateAfterExpiry_ = value; - } - /** - *
-     * This flag, when set to true, will allow governance to recover a client
-     * which has expired
-     * 
- * - * bool allow_update_after_expiry = 8; - */ - private void clearAllowUpdateAfterExpiry() { - - allowUpdateAfterExpiry_ = false; - } - - public static final int ALLOW_UPDATE_AFTER_MISBEHAVIOUR_FIELD_NUMBER = 9; - private boolean allowUpdateAfterMisbehaviour_; - /** - *
-     * This flag, when set to true, will allow governance to unfreeze a client
-     * whose chain has experienced a misbehaviour event
-     * 
- * - * bool allow_update_after_misbehaviour = 9; - * @return The allowUpdateAfterMisbehaviour. - */ - @java.lang.Override - public boolean getAllowUpdateAfterMisbehaviour() { - return allowUpdateAfterMisbehaviour_; - } - /** - *
-     * This flag, when set to true, will allow governance to unfreeze a client
-     * whose chain has experienced a misbehaviour event
-     * 
- * - * bool allow_update_after_misbehaviour = 9; - * @param value The allowUpdateAfterMisbehaviour to set. - */ - private void setAllowUpdateAfterMisbehaviour(boolean value) { - - allowUpdateAfterMisbehaviour_ = value; - } - /** - *
-     * This flag, when set to true, will allow governance to unfreeze a client
-     * whose chain has experienced a misbehaviour event
-     * 
- * - * bool allow_update_after_misbehaviour = 9; - */ - private void clearAllowUpdateAfterMisbehaviour() { - - allowUpdateAfterMisbehaviour_ = false; - } - - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ClientState parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.ClientState prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.ClientState} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.ClientState, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.ClientState) - ibc.tendermint.light.TendermintLight.ClientStateOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.ClientState.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * string chain_id = 1; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return instance.getChainId(); - } - /** - * string chain_id = 1; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return instance.getChainIdBytes(); - } - /** - * string chain_id = 1; - * @param value The chainId to set. - * @return This builder for chaining. - */ - public Builder setChainId( - java.lang.String value) { - copyOnWrite(); - instance.setChainId(value); - return this; - } - /** - * string chain_id = 1; - * @return This builder for chaining. - */ - public Builder clearChainId() { - copyOnWrite(); - instance.clearChainId(); - return this; - } - /** - * string chain_id = 1; - * @param value The bytes for chainId to set. - * @return This builder for chaining. - */ - public Builder setChainIdBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setChainIdBytes(value); - return this; - } - - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - @java.lang.Override - public boolean hasTrustLevel() { - return instance.hasTrustLevel(); - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Fraction getTrustLevel() { - return instance.getTrustLevel(); - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - public Builder setTrustLevel(ibc.tendermint.light.TendermintLight.Fraction value) { - copyOnWrite(); - instance.setTrustLevel(value); - return this; - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - public Builder setTrustLevel( - ibc.tendermint.light.TendermintLight.Fraction.Builder builderForValue) { - copyOnWrite(); - instance.setTrustLevel(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - public Builder mergeTrustLevel(ibc.tendermint.light.TendermintLight.Fraction value) { - copyOnWrite(); - instance.mergeTrustLevel(value); - return this; - } - /** - * .ibc.tendermint.light.Fraction trust_level = 2; - */ - public Builder clearTrustLevel() { copyOnWrite(); - instance.clearTrustLevel(); - return this; - } - - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - @java.lang.Override - public boolean hasTrustingPeriod() { - return instance.hasTrustingPeriod(); - } - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getTrustingPeriod() { - return instance.getTrustingPeriod(); - } - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - public Builder setTrustingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.setTrustingPeriod(value); - return this; - } - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - public Builder setTrustingPeriod( - ibc.tendermint.light.TendermintLight.Duration.Builder builderForValue) { - copyOnWrite(); - instance.setTrustingPeriod(builderForValue.build()); - return this; - } - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - public Builder mergeTrustingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.mergeTrustingPeriod(value); - return this; - } - /** - *
-       * duration of the period since the LastestTimestamp during which the
-       * submitted headers are valid for upgrade
-       * 
- * - * .ibc.tendermint.light.Duration trusting_period = 3; - */ - public Builder clearTrustingPeriod() { copyOnWrite(); - instance.clearTrustingPeriod(); - return this; - } - - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - @java.lang.Override - public boolean hasUnbondingPeriod() { - return instance.hasUnbondingPeriod(); - } - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getUnbondingPeriod() { - return instance.getUnbondingPeriod(); - } - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - public Builder setUnbondingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.setUnbondingPeriod(value); - return this; - } - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - public Builder setUnbondingPeriod( - ibc.tendermint.light.TendermintLight.Duration.Builder builderForValue) { - copyOnWrite(); - instance.setUnbondingPeriod(builderForValue.build()); - return this; - } - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - public Builder mergeUnbondingPeriod(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.mergeUnbondingPeriod(value); - return this; - } - /** - *
-       * duration of the staking unbonding period
-       * 
- * - * .ibc.tendermint.light.Duration unbonding_period = 4; - */ - public Builder clearUnbondingPeriod() { copyOnWrite(); - instance.clearUnbondingPeriod(); - return this; - } - - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - @java.lang.Override - public boolean hasMaxClockDrift() { - return instance.hasMaxClockDrift(); - } - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Duration getMaxClockDrift() { - return instance.getMaxClockDrift(); - } - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - public Builder setMaxClockDrift(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.setMaxClockDrift(value); - return this; - } - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - public Builder setMaxClockDrift( - ibc.tendermint.light.TendermintLight.Duration.Builder builderForValue) { - copyOnWrite(); - instance.setMaxClockDrift(builderForValue.build()); - return this; - } - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - public Builder mergeMaxClockDrift(ibc.tendermint.light.TendermintLight.Duration value) { - copyOnWrite(); - instance.mergeMaxClockDrift(value); - return this; - } - /** - *
-       * defines how much new (untrusted) header's Time can drift into the future.
-       * 
- * - * .ibc.tendermint.light.Duration max_clock_drift = 5; - */ - public Builder clearMaxClockDrift() { copyOnWrite(); - instance.clearMaxClockDrift(); - return this; - } - - /** - *
-       * Block height when the client was frozen due to a misbehaviour
-       *ibc.core.client.v1.Height frozen_height = 6;
-       * 
- * - * int64 frozen_height = 6; - * @return The frozenHeight. - */ - @java.lang.Override - public long getFrozenHeight() { - return instance.getFrozenHeight(); - } - /** - *
-       * Block height when the client was frozen due to a misbehaviour
-       *ibc.core.client.v1.Height frozen_height = 6;
-       * 
- * - * int64 frozen_height = 6; - * @param value The frozenHeight to set. - * @return This builder for chaining. - */ - public Builder setFrozenHeight(long value) { - copyOnWrite(); - instance.setFrozenHeight(value); - return this; - } - /** - *
-       * Block height when the client was frozen due to a misbehaviour
-       *ibc.core.client.v1.Height frozen_height = 6;
-       * 
- * - * int64 frozen_height = 6; - * @return This builder for chaining. - */ - public Builder clearFrozenHeight() { - copyOnWrite(); - instance.clearFrozenHeight(); - return this; - } - - /** - *
-       * Latest height the client was updated to
-       * 
- * - * int64 latest_height = 7; - * @return The latestHeight. - */ - @java.lang.Override - public long getLatestHeight() { - return instance.getLatestHeight(); - } - /** - *
-       * Latest height the client was updated to
-       * 
- * - * int64 latest_height = 7; - * @param value The latestHeight to set. - * @return This builder for chaining. - */ - public Builder setLatestHeight(long value) { - copyOnWrite(); - instance.setLatestHeight(value); - return this; - } - /** - *
-       * Latest height the client was updated to
-       * 
- * - * int64 latest_height = 7; - * @return This builder for chaining. - */ - public Builder clearLatestHeight() { - copyOnWrite(); - instance.clearLatestHeight(); - return this; - } - - /** - *
-       * This flag, when set to true, will allow governance to recover a client
-       * which has expired
-       * 
- * - * bool allow_update_after_expiry = 8; - * @return The allowUpdateAfterExpiry. - */ - @java.lang.Override - public boolean getAllowUpdateAfterExpiry() { - return instance.getAllowUpdateAfterExpiry(); - } - /** - *
-       * This flag, when set to true, will allow governance to recover a client
-       * which has expired
-       * 
- * - * bool allow_update_after_expiry = 8; - * @param value The allowUpdateAfterExpiry to set. - * @return This builder for chaining. - */ - public Builder setAllowUpdateAfterExpiry(boolean value) { - copyOnWrite(); - instance.setAllowUpdateAfterExpiry(value); - return this; - } - /** - *
-       * This flag, when set to true, will allow governance to recover a client
-       * which has expired
-       * 
- * - * bool allow_update_after_expiry = 8; - * @return This builder for chaining. - */ - public Builder clearAllowUpdateAfterExpiry() { - copyOnWrite(); - instance.clearAllowUpdateAfterExpiry(); - return this; - } - - /** - *
-       * This flag, when set to true, will allow governance to unfreeze a client
-       * whose chain has experienced a misbehaviour event
-       * 
- * - * bool allow_update_after_misbehaviour = 9; - * @return The allowUpdateAfterMisbehaviour. - */ - @java.lang.Override - public boolean getAllowUpdateAfterMisbehaviour() { - return instance.getAllowUpdateAfterMisbehaviour(); - } - /** - *
-       * This flag, when set to true, will allow governance to unfreeze a client
-       * whose chain has experienced a misbehaviour event
-       * 
- * - * bool allow_update_after_misbehaviour = 9; - * @param value The allowUpdateAfterMisbehaviour to set. - * @return This builder for chaining. - */ - public Builder setAllowUpdateAfterMisbehaviour(boolean value) { - copyOnWrite(); - instance.setAllowUpdateAfterMisbehaviour(value); - return this; - } - /** - *
-       * This flag, when set to true, will allow governance to unfreeze a client
-       * whose chain has experienced a misbehaviour event
-       * 
- * - * bool allow_update_after_misbehaviour = 9; - * @return This builder for chaining. - */ - public Builder clearAllowUpdateAfterMisbehaviour() { - copyOnWrite(); - instance.clearAllowUpdateAfterMisbehaviour(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.ClientState) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.ClientState(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "chainId_", - "trustLevel_", - "trustingPeriod_", - "unbondingPeriod_", - "maxClockDrift_", - "frozenHeight_", - "latestHeight_", - "allowUpdateAfterExpiry_", - "allowUpdateAfterMisbehaviour_", - }; - java.lang.String info = - "\u0000\t\u0000\u0000\u0001\t\t\u0000\u0000\u0000\u0001\u0208\u0002\t\u0003\t\u0004" + - "\t\u0005\t\u0006\u0002\u0007\u0002\b\u0007\t\u0007"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.ClientState.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.ClientState) - private static final ibc.tendermint.light.TendermintLight.ClientState DEFAULT_INSTANCE; - static { - ClientState defaultInstance = new ClientState(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - ClientState.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.ClientState getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ConsensusStateOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.ConsensusState) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - * @return The timestamp. - */ - ibc.tendermint.light.TendermintLight.Timestamp getTimestamp(); - - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - * @return Whether the root field is set. - */ - boolean hasRoot(); - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - * @return The root. - */ - ibc.tendermint.light.TendermintLight.MerkleRoot getRoot(); - - /** - * bytes next_validators_hash = 3; - * @return The nextValidatorsHash. - */ - com.google.protobuf.ByteString getNextValidatorsHash(); - } - /** - *
-   * ConsensusState defines the consensus state from Tendermint.
-   * 
- * - * Protobuf type {@code ibc.tendermint.light.ConsensusState} - */ - public static final class ConsensusState extends - com.google.protobuf.GeneratedMessageLite< - ConsensusState, ConsensusState.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.ConsensusState) - ConsensusStateOrBuilder { - private ConsensusState() { - nextValidatorsHash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int TIMESTAMP_FIELD_NUMBER = 1; - private ibc.tendermint.light.TendermintLight.Timestamp timestamp_; - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return timestamp_ == null ? ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance() : timestamp_; - } - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - private void setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - timestamp_ = value; - - } - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - if (timestamp_ != null && - timestamp_ != ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance()) { - timestamp_ = - ibc.tendermint.light.TendermintLight.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - - } - /** - *
-     * timestamp that corresponds to the block height in which the ConsensusState
-     * was stored.
-     * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - private void clearTimestamp() { timestamp_ = null; - - } - - public static final int ROOT_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.MerkleRoot root_; - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - @java.lang.Override - public boolean hasRoot() { - return root_ != null; - } - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.MerkleRoot getRoot() { - return root_ == null ? ibc.tendermint.light.TendermintLight.MerkleRoot.getDefaultInstance() : root_; - } - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - private void setRoot(ibc.tendermint.light.TendermintLight.MerkleRoot value) { - value.getClass(); - root_ = value; - - } - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeRoot(ibc.tendermint.light.TendermintLight.MerkleRoot value) { - value.getClass(); - if (root_ != null && - root_ != ibc.tendermint.light.TendermintLight.MerkleRoot.getDefaultInstance()) { - root_ = - ibc.tendermint.light.TendermintLight.MerkleRoot.newBuilder(root_).mergeFrom(value).buildPartial(); - } else { - root_ = value; - } - - } - /** - *
-     * commitment root (i.e app hash)
-     * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - private void clearRoot() { root_ = null; - - } - - public static final int NEXT_VALIDATORS_HASH_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString nextValidatorsHash_; - /** - * bytes next_validators_hash = 3; - * @return The nextValidatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextValidatorsHash() { - return nextValidatorsHash_; - } - /** - * bytes next_validators_hash = 3; - * @param value The nextValidatorsHash to set. - */ - private void setNextValidatorsHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - nextValidatorsHash_ = value; - } - /** - * bytes next_validators_hash = 3; - */ - private void clearNextValidatorsHash() { - - nextValidatorsHash_ = getDefaultInstance().getNextValidatorsHash(); - } - - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ConsensusState parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.ConsensusState prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     * ConsensusState defines the consensus state from Tendermint.
-     * 
- * - * Protobuf type {@code ibc.tendermint.light.ConsensusState} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.ConsensusState, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.ConsensusState) - ibc.tendermint.light.TendermintLight.ConsensusStateOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.ConsensusState.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - @java.lang.Override - public boolean hasTimestamp() { - return instance.hasTimestamp(); - } - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return instance.getTimestamp(); - } - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - public Builder setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.setTimestamp(value); - return this; - } - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - public Builder setTimestamp( - ibc.tendermint.light.TendermintLight.Timestamp.Builder builderForValue) { - copyOnWrite(); - instance.setTimestamp(builderForValue.build()); - return this; - } - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - public Builder mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.mergeTimestamp(value); - return this; - } - /** - *
-       * timestamp that corresponds to the block height in which the ConsensusState
-       * was stored.
-       * 
- * - * .ibc.tendermint.light.Timestamp timestamp = 1; - */ - public Builder clearTimestamp() { copyOnWrite(); - instance.clearTimestamp(); - return this; - } - - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - @java.lang.Override - public boolean hasRoot() { - return instance.hasRoot(); - } - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.MerkleRoot getRoot() { - return instance.getRoot(); - } - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - public Builder setRoot(ibc.tendermint.light.TendermintLight.MerkleRoot value) { - copyOnWrite(); - instance.setRoot(value); - return this; - } - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - public Builder setRoot( - ibc.tendermint.light.TendermintLight.MerkleRoot.Builder builderForValue) { - copyOnWrite(); - instance.setRoot(builderForValue.build()); - return this; - } - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - public Builder mergeRoot(ibc.tendermint.light.TendermintLight.MerkleRoot value) { - copyOnWrite(); - instance.mergeRoot(value); - return this; - } - /** - *
-       * commitment root (i.e app hash)
-       * 
- * - * .ibc.tendermint.light.MerkleRoot root = 2; - */ - public Builder clearRoot() { copyOnWrite(); - instance.clearRoot(); - return this; - } - - /** - * bytes next_validators_hash = 3; - * @return The nextValidatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextValidatorsHash() { - return instance.getNextValidatorsHash(); - } - /** - * bytes next_validators_hash = 3; - * @param value The nextValidatorsHash to set. - * @return This builder for chaining. - */ - public Builder setNextValidatorsHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setNextValidatorsHash(value); - return this; - } - /** - * bytes next_validators_hash = 3; - * @return This builder for chaining. - */ - public Builder clearNextValidatorsHash() { - copyOnWrite(); - instance.clearNextValidatorsHash(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.ConsensusState) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.ConsensusState(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "timestamp_", - "root_", - "nextValidatorsHash_", - }; - java.lang.String info = - "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + - "\n"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.ConsensusState.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.ConsensusState) - private static final ibc.tendermint.light.TendermintLight.ConsensusState DEFAULT_INSTANCE; - static { - ConsensusState defaultInstance = new ConsensusState(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - ConsensusState.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.ConsensusState getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface MerkleRootOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.MerkleRoot) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * bytes hash = 1; - * @return The hash. - */ - com.google.protobuf.ByteString getHash(); - } - /** - *
-   * MerkleRoot defines a merkle root hash.
-   * In the Cosmos SDK, the AppHash of a block header becomes the root.
-   * 
- * - * Protobuf type {@code ibc.tendermint.light.MerkleRoot} - */ - public static final class MerkleRoot extends - com.google.protobuf.GeneratedMessageLite< - MerkleRoot, MerkleRoot.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.MerkleRoot) - MerkleRootOrBuilder { - private MerkleRoot() { - hash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int HASH_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString hash_; - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return hash_; - } - /** - * bytes hash = 1; - * @param value The hash to set. - */ - private void setHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - hash_ = value; - } - /** - * bytes hash = 1; - */ - private void clearHash() { - - hash_ = getDefaultInstance().getHash(); - } - - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.MerkleRoot parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.MerkleRoot prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     * MerkleRoot defines a merkle root hash.
-     * In the Cosmos SDK, the AppHash of a block header becomes the root.
-     * 
- * - * Protobuf type {@code ibc.tendermint.light.MerkleRoot} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.MerkleRoot, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.MerkleRoot) - ibc.tendermint.light.TendermintLight.MerkleRootOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.MerkleRoot.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return instance.getHash(); - } - /** - * bytes hash = 1; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setHash(value); - return this; - } - /** - * bytes hash = 1; - * @return This builder for chaining. - */ - public Builder clearHash() { - copyOnWrite(); - instance.clearHash(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.MerkleRoot) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.MerkleRoot(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "hash_", - }; - java.lang.String info = - "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.MerkleRoot.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.MerkleRoot) - private static final ibc.tendermint.light.TendermintLight.MerkleRoot DEFAULT_INSTANCE; - static { - MerkleRoot defaultInstance = new MerkleRoot(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - MerkleRoot.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.MerkleRoot getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface CanonicalPartSetHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.CanonicalPartSetHeader) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * uint32 total = 1; - * @return The total. - */ - int getTotal(); - - /** - * bytes hash = 2; - * @return The hash. - */ - com.google.protobuf.ByteString getHash(); - } - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalPartSetHeader} - */ - public static final class CanonicalPartSetHeader extends - com.google.protobuf.GeneratedMessageLite< - CanonicalPartSetHeader, CanonicalPartSetHeader.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.CanonicalPartSetHeader) - CanonicalPartSetHeaderOrBuilder { - private CanonicalPartSetHeader() { - hash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int TOTAL_FIELD_NUMBER = 1; - private int total_; - /** - * uint32 total = 1; - * @return The total. - */ - @java.lang.Override - public int getTotal() { - return total_; - } - /** - * uint32 total = 1; - * @param value The total to set. - */ - private void setTotal(int value) { - - total_ = value; - } - /** - * uint32 total = 1; - */ - private void clearTotal() { - - total_ = 0; - } - - public static final int HASH_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString hash_; - /** - * bytes hash = 2; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return hash_; - } - /** - * bytes hash = 2; - * @param value The hash to set. - */ - private void setHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - hash_ = value; - } - /** - * bytes hash = 2; - */ - private void clearHash() { - - hash_ = getDefaultInstance().getHash(); - } - - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalPartSetHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.CanonicalPartSetHeader) - ibc.tendermint.light.TendermintLight.CanonicalPartSetHeaderOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * uint32 total = 1; - * @return The total. - */ - @java.lang.Override - public int getTotal() { - return instance.getTotal(); - } - /** - * uint32 total = 1; - * @param value The total to set. - * @return This builder for chaining. - */ - public Builder setTotal(int value) { - copyOnWrite(); - instance.setTotal(value); - return this; - } - /** - * uint32 total = 1; - * @return This builder for chaining. - */ - public Builder clearTotal() { - copyOnWrite(); - instance.clearTotal(); - return this; - } - - /** - * bytes hash = 2; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return instance.getHash(); - } - /** - * bytes hash = 2; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setHash(value); - return this; - } - /** - * bytes hash = 2; - * @return This builder for chaining. - */ - public Builder clearHash() { - copyOnWrite(); - instance.clearHash(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.CanonicalPartSetHeader) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "total_", - "hash_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u000b\u0002\n" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.CanonicalPartSetHeader) - private static final ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader DEFAULT_INSTANCE; - static { - CanonicalPartSetHeader defaultInstance = new CanonicalPartSetHeader(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - CanonicalPartSetHeader.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface CanonicalBlockIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.CanonicalBlockID) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * bytes hash = 1; - * @return The hash. - */ - com.google.protobuf.ByteString getHash(); - - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - * @return Whether the partSetHeader field is set. - */ - boolean hasPartSetHeader(); - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - * @return The partSetHeader. - */ - ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader getPartSetHeader(); - } - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalBlockID} - */ - public static final class CanonicalBlockID extends - com.google.protobuf.GeneratedMessageLite< - CanonicalBlockID, CanonicalBlockID.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.CanonicalBlockID) - CanonicalBlockIDOrBuilder { - private CanonicalBlockID() { - hash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int HASH_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString hash_; - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return hash_; - } - /** - * bytes hash = 1; - * @param value The hash to set. - */ - private void setHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - hash_ = value; - } - /** - * bytes hash = 1; - */ - private void clearHash() { - - hash_ = getDefaultInstance().getHash(); - } - - public static final int PART_SET_HEADER_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader partSetHeader_; - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - @java.lang.Override - public boolean hasPartSetHeader() { - return partSetHeader_ != null; - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader getPartSetHeader() { - return partSetHeader_ == null ? ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.getDefaultInstance() : partSetHeader_; - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - private void setPartSetHeader(ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader value) { - value.getClass(); - partSetHeader_ = value; - - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergePartSetHeader(ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader value) { - value.getClass(); - if (partSetHeader_ != null && - partSetHeader_ != ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.getDefaultInstance()) { - partSetHeader_ = - ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.newBuilder(partSetHeader_).mergeFrom(value).buildPartial(); - } else { - partSetHeader_ = value; - } - - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - private void clearPartSetHeader() { partSetHeader_ = null; - - } - - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.CanonicalBlockID prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalBlockID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.CanonicalBlockID, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.CanonicalBlockID) - ibc.tendermint.light.TendermintLight.CanonicalBlockIDOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.CanonicalBlockID.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return instance.getHash(); - } - /** - * bytes hash = 1; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setHash(value); - return this; - } - /** - * bytes hash = 1; - * @return This builder for chaining. - */ - public Builder clearHash() { - copyOnWrite(); - instance.clearHash(); - return this; - } - - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - @java.lang.Override - public boolean hasPartSetHeader() { - return instance.hasPartSetHeader(); - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader getPartSetHeader() { - return instance.getPartSetHeader(); - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - public Builder setPartSetHeader(ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader value) { - copyOnWrite(); - instance.setPartSetHeader(value); - return this; - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - public Builder setPartSetHeader( - ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader.Builder builderForValue) { - copyOnWrite(); - instance.setPartSetHeader(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - public Builder mergePartSetHeader(ibc.tendermint.light.TendermintLight.CanonicalPartSetHeader value) { - copyOnWrite(); - instance.mergePartSetHeader(value); - return this; - } - /** - * .ibc.tendermint.light.CanonicalPartSetHeader part_set_header = 2; - */ - public Builder clearPartSetHeader() { copyOnWrite(); - instance.clearPartSetHeader(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.CanonicalBlockID) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.CanonicalBlockID(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "hash_", - "partSetHeader_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\n\u0002\t"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.CanonicalBlockID.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.CanonicalBlockID) - private static final ibc.tendermint.light.TendermintLight.CanonicalBlockID DEFAULT_INSTANCE; - static { - CanonicalBlockID defaultInstance = new CanonicalBlockID(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - CanonicalBlockID.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.CanonicalBlockID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface CanonicalVoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.CanonicalVote) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - ibc.tendermint.light.TendermintLight.SignedMsgType getType(); - - /** - * sfixed64 height = 2; - * @return The height. - */ - long getHeight(); - - /** - * sfixed64 round = 3; - * @return The round. - */ - long getRound(); - - /** - * .ibc.tendermint.light.BlockID block_id = 4; - * @return Whether the blockId field is set. - */ - boolean hasBlockId(); - /** - * .ibc.tendermint.light.BlockID block_id = 4; - * @return The blockId. - */ - ibc.tendermint.light.TendermintLight.BlockID getBlockId(); - - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - * @return The timestamp. - */ - ibc.tendermint.light.TendermintLight.Timestamp getTimestamp(); - - /** - * string chain_id = 6; - * @return The chainId. - */ - java.lang.String getChainId(); - /** - * string chain_id = 6; - * @return The bytes for chainId. - */ - com.google.protobuf.ByteString - getChainIdBytes(); - } - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalVote} - */ - public static final class CanonicalVote extends - com.google.protobuf.GeneratedMessageLite< - CanonicalVote, CanonicalVote.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.CanonicalVote) - CanonicalVoteOrBuilder { - private CanonicalVote() { - chainId_ = ""; - } - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedMsgType getType() { - ibc.tendermint.light.TendermintLight.SignedMsgType result = ibc.tendermint.light.TendermintLight.SignedMsgType.forNumber(type_); - return result == null ? ibc.tendermint.light.TendermintLight.SignedMsgType.UNRECOGNIZED : result; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The enum numeric value on the wire for type to set. - */ - private void setTypeValue(int value) { - type_ = value; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The type to set. - */ - private void setType(ibc.tendermint.light.TendermintLight.SignedMsgType value) { - type_ = value.getNumber(); - - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - */ - private void clearType() { - - type_ = 0; - } - - public static final int HEIGHT_FIELD_NUMBER = 2; - private long height_; - /** - * sfixed64 height = 2; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return height_; - } - /** - * sfixed64 height = 2; - * @param value The height to set. - */ - private void setHeight(long value) { - - height_ = value; - } - /** - * sfixed64 height = 2; - */ - private void clearHeight() { - - height_ = 0L; - } - - public static final int ROUND_FIELD_NUMBER = 3; - private long round_; - /** - * sfixed64 round = 3; - * @return The round. - */ - @java.lang.Override - public long getRound() { - return round_; - } - /** - * sfixed64 round = 3; - * @param value The round to set. - */ - private void setRound(long value) { - - round_ = value; - } - /** - * sfixed64 round = 3; - */ - private void clearRound() { - - round_ = 0L; - } - - public static final int BLOCK_ID_FIELD_NUMBER = 4; - private ibc.tendermint.light.TendermintLight.BlockID blockId_; - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public boolean hasBlockId() { - return blockId_ != null; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return blockId_ == null ? ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance() : blockId_; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - private void setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - blockId_ = value; - - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - if (blockId_ != null && - blockId_ != ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance()) { - blockId_ = - ibc.tendermint.light.TendermintLight.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); - } else { - blockId_ = value; - } - - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - private void clearBlockId() { blockId_ = null; - - } - - public static final int TIMESTAMP_FIELD_NUMBER = 5; - private ibc.tendermint.light.TendermintLight.Timestamp timestamp_; - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return timestamp_ == null ? ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - private void setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - timestamp_ = value; - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - if (timestamp_ != null && - timestamp_ != ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance()) { - timestamp_ = - ibc.tendermint.light.TendermintLight.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - private void clearTimestamp() { timestamp_ = null; - - } - - public static final int CHAIN_ID_FIELD_NUMBER = 6; - private java.lang.String chainId_; - /** - * string chain_id = 6; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return chainId_; - } - /** - * string chain_id = 6; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return com.google.protobuf.ByteString.copyFromUtf8(chainId_); - } - /** - * string chain_id = 6; - * @param value The chainId to set. - */ - private void setChainId( - java.lang.String value) { - java.lang.Class valueClass = value.getClass(); - - chainId_ = value; - } - /** - * string chain_id = 6; - */ - private void clearChainId() { - - chainId_ = getDefaultInstance().getChainId(); - } - /** - * string chain_id = 6; - * @param value The bytes for chainId to set. - */ - private void setChainIdBytes( - com.google.protobuf.ByteString value) { - checkByteStringIsUtf8(value); - chainId_ = value.toStringUtf8(); - - } - - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CanonicalVote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.CanonicalVote prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.CanonicalVote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.CanonicalVote, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.CanonicalVote) - ibc.tendermint.light.TendermintLight.CanonicalVoteOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.CanonicalVote.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return instance.getTypeValue(); - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - copyOnWrite(); - instance.setTypeValue(value); - return this; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedMsgType getType() { - return instance.getType(); - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setType(ibc.tendermint.light.TendermintLight.SignedMsgType value) { - copyOnWrite(); - instance.setType(value); - return this; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - copyOnWrite(); - instance.clearType(); - return this; - } - - /** - * sfixed64 height = 2; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return instance.getHeight(); - } - /** - * sfixed64 height = 2; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(long value) { - copyOnWrite(); - instance.setHeight(value); - return this; - } - /** - * sfixed64 height = 2; - * @return This builder for chaining. - */ - public Builder clearHeight() { - copyOnWrite(); - instance.clearHeight(); - return this; - } - - /** - * sfixed64 round = 3; - * @return The round. - */ - @java.lang.Override - public long getRound() { - return instance.getRound(); - } - /** - * sfixed64 round = 3; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(long value) { - copyOnWrite(); - instance.setRound(value); - return this; - } - /** - * sfixed64 round = 3; - * @return This builder for chaining. - */ - public Builder clearRound() { - copyOnWrite(); - instance.clearRound(); - return this; - } - - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public boolean hasBlockId() { - return instance.hasBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return instance.getBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.setBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder setBlockId( - ibc.tendermint.light.TendermintLight.BlockID.Builder builderForValue) { - copyOnWrite(); - instance.setBlockId(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.mergeBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder clearBlockId() { copyOnWrite(); - instance.clearBlockId(); - return this; - } - - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public boolean hasTimestamp() { - return instance.hasTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return instance.getTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.setTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder setTimestamp( - ibc.tendermint.light.TendermintLight.Timestamp.Builder builderForValue) { - copyOnWrite(); - instance.setTimestamp(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.mergeTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder clearTimestamp() { copyOnWrite(); - instance.clearTimestamp(); - return this; - } - - /** - * string chain_id = 6; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return instance.getChainId(); - } - /** - * string chain_id = 6; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return instance.getChainIdBytes(); - } - /** - * string chain_id = 6; - * @param value The chainId to set. - * @return This builder for chaining. - */ - public Builder setChainId( - java.lang.String value) { - copyOnWrite(); - instance.setChainId(value); - return this; - } - /** - * string chain_id = 6; - * @return This builder for chaining. - */ - public Builder clearChainId() { - copyOnWrite(); - instance.clearChainId(); - return this; - } - /** - * string chain_id = 6; - * @param value The bytes for chainId to set. - * @return This builder for chaining. - */ - public Builder setChainIdBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setChainIdBytes(value); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.CanonicalVote) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.CanonicalVote(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "type_", - "height_", - "round_", - "blockId_", - "timestamp_", - "chainId_", - }; - java.lang.String info = - "\u0000\u0006\u0000\u0000\u0001\u0006\u0006\u0000\u0000\u0000\u0001\f\u0002\u000e" + - "\u0003\u000e\u0004\t\u0005\t\u0006\u0208"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.CanonicalVote.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.CanonicalVote) - private static final ibc.tendermint.light.TendermintLight.CanonicalVote DEFAULT_INSTANCE; - static { - CanonicalVote defaultInstance = new CanonicalVote(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - CanonicalVote.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.CanonicalVote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface VoteOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Vote) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - int getTypeValue(); - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - ibc.tendermint.light.TendermintLight.SignedMsgType getType(); - - /** - * int64 height = 2; - * @return The height. - */ - long getHeight(); - - /** - * int32 round = 3; - * @return The round. - */ - int getRound(); - - /** - * .ibc.tendermint.light.BlockID block_id = 4; - * @return Whether the blockId field is set. - */ - boolean hasBlockId(); - /** - * .ibc.tendermint.light.BlockID block_id = 4; - * @return The blockId. - */ - ibc.tendermint.light.TendermintLight.BlockID getBlockId(); - - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - * @return The timestamp. - */ - ibc.tendermint.light.TendermintLight.Timestamp getTimestamp(); - - /** - * bytes validator_address = 6; - * @return The validatorAddress. - */ - com.google.protobuf.ByteString getValidatorAddress(); - - /** - * int32 validator_index = 7; - * @return The validatorIndex. - */ - int getValidatorIndex(); - - /** - * bytes signature = 8; - * @return The signature. - */ - com.google.protobuf.ByteString getSignature(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Vote} - */ - public static final class Vote extends - com.google.protobuf.GeneratedMessageLite< - Vote, Vote.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Vote) - VoteOrBuilder { - private Vote() { - validatorAddress_ = com.google.protobuf.ByteString.EMPTY; - signature_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int TYPE_FIELD_NUMBER = 1; - private int type_; - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedMsgType getType() { - ibc.tendermint.light.TendermintLight.SignedMsgType result = ibc.tendermint.light.TendermintLight.SignedMsgType.forNumber(type_); - return result == null ? ibc.tendermint.light.TendermintLight.SignedMsgType.UNRECOGNIZED : result; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The enum numeric value on the wire for type to set. - */ - private void setTypeValue(int value) { - type_ = value; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The type to set. - */ - private void setType(ibc.tendermint.light.TendermintLight.SignedMsgType value) { - type_ = value.getNumber(); - - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - */ - private void clearType() { - - type_ = 0; - } - - public static final int HEIGHT_FIELD_NUMBER = 2; - private long height_; - /** - * int64 height = 2; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return height_; - } - /** - * int64 height = 2; - * @param value The height to set. - */ - private void setHeight(long value) { - - height_ = value; - } - /** - * int64 height = 2; - */ - private void clearHeight() { - - height_ = 0L; - } - - public static final int ROUND_FIELD_NUMBER = 3; - private int round_; - /** - * int32 round = 3; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - * int32 round = 3; - * @param value The round to set. - */ - private void setRound(int value) { - - round_ = value; - } - /** - * int32 round = 3; - */ - private void clearRound() { - - round_ = 0; - } - - public static final int BLOCK_ID_FIELD_NUMBER = 4; - private ibc.tendermint.light.TendermintLight.BlockID blockId_; - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public boolean hasBlockId() { - return blockId_ != null; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return blockId_ == null ? ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance() : blockId_; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - private void setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - blockId_ = value; - - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - if (blockId_ != null && - blockId_ != ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance()) { - blockId_ = - ibc.tendermint.light.TendermintLight.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); - } else { - blockId_ = value; - } - - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - private void clearBlockId() { blockId_ = null; - - } - - public static final int TIMESTAMP_FIELD_NUMBER = 5; - private ibc.tendermint.light.TendermintLight.Timestamp timestamp_; - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return timestamp_ == null ? ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - private void setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - timestamp_ = value; - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - if (timestamp_ != null && - timestamp_ != ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance()) { - timestamp_ = - ibc.tendermint.light.TendermintLight.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - private void clearTimestamp() { timestamp_ = null; - - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 6; - private com.google.protobuf.ByteString validatorAddress_; - /** - * bytes validator_address = 6; - * @return The validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorAddress() { - return validatorAddress_; - } - /** - * bytes validator_address = 6; - * @param value The validatorAddress to set. - */ - private void setValidatorAddress(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - validatorAddress_ = value; - } - /** - * bytes validator_address = 6; - */ - private void clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - } - - public static final int VALIDATOR_INDEX_FIELD_NUMBER = 7; - private int validatorIndex_; - /** - * int32 validator_index = 7; - * @return The validatorIndex. - */ - @java.lang.Override - public int getValidatorIndex() { - return validatorIndex_; - } - /** - * int32 validator_index = 7; - * @param value The validatorIndex to set. - */ - private void setValidatorIndex(int value) { - - validatorIndex_ = value; - } - /** - * int32 validator_index = 7; - */ - private void clearValidatorIndex() { - - validatorIndex_ = 0; - } - - public static final int SIGNATURE_FIELD_NUMBER = 8; - private com.google.protobuf.ByteString signature_; - /** - * bytes signature = 8; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - /** - * bytes signature = 8; - * @param value The signature to set. - */ - private void setSignature(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - signature_ = value; - } - /** - * bytes signature = 8; - */ - private void clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - } - - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Vote parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Vote parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Vote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Vote prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Vote} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Vote, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Vote) - ibc.tendermint.light.TendermintLight.VoteOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Vote.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return instance.getTypeValue(); - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The type to set. - * @return This builder for chaining. - */ - public Builder setTypeValue(int value) { - copyOnWrite(); - instance.setTypeValue(value); - return this; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return The type. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedMsgType getType() { - return instance.getType(); - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @param value The enum numeric value on the wire for type to set. - * @return This builder for chaining. - */ - public Builder setType(ibc.tendermint.light.TendermintLight.SignedMsgType value) { - copyOnWrite(); - instance.setType(value); - return this; - } - /** - * .ibc.tendermint.light.SignedMsgType type = 1; - * @return This builder for chaining. - */ - public Builder clearType() { - copyOnWrite(); - instance.clearType(); - return this; - } - - /** - * int64 height = 2; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return instance.getHeight(); - } - /** - * int64 height = 2; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(long value) { - copyOnWrite(); - instance.setHeight(value); - return this; - } - /** - * int64 height = 2; - * @return This builder for chaining. - */ - public Builder clearHeight() { - copyOnWrite(); - instance.clearHeight(); - return this; - } - - /** - * int32 round = 3; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return instance.getRound(); - } - /** - * int32 round = 3; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - copyOnWrite(); - instance.setRound(value); - return this; - } - /** - * int32 round = 3; - * @return This builder for chaining. - */ - public Builder clearRound() { - copyOnWrite(); - instance.clearRound(); - return this; - } - - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public boolean hasBlockId() { - return instance.hasBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return instance.getBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.setBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder setBlockId( - ibc.tendermint.light.TendermintLight.BlockID.Builder builderForValue) { - copyOnWrite(); - instance.setBlockId(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.mergeBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 4; - */ - public Builder clearBlockId() { copyOnWrite(); - instance.clearBlockId(); - return this; - } - - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public boolean hasTimestamp() { - return instance.hasTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return instance.getTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.setTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder setTimestamp( - ibc.tendermint.light.TendermintLight.Timestamp.Builder builderForValue) { - copyOnWrite(); - instance.setTimestamp(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.mergeTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 5; - */ - public Builder clearTimestamp() { copyOnWrite(); - instance.clearTimestamp(); - return this; - } - - /** - * bytes validator_address = 6; - * @return The validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorAddress() { - return instance.getValidatorAddress(); - } - /** - * bytes validator_address = 6; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setValidatorAddress(value); - return this; - } - /** - * bytes validator_address = 6; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - copyOnWrite(); - instance.clearValidatorAddress(); - return this; - } - - /** - * int32 validator_index = 7; - * @return The validatorIndex. - */ - @java.lang.Override - public int getValidatorIndex() { - return instance.getValidatorIndex(); - } - /** - * int32 validator_index = 7; - * @param value The validatorIndex to set. - * @return This builder for chaining. - */ - public Builder setValidatorIndex(int value) { - copyOnWrite(); - instance.setValidatorIndex(value); - return this; - } - /** - * int32 validator_index = 7; - * @return This builder for chaining. - */ - public Builder clearValidatorIndex() { - copyOnWrite(); - instance.clearValidatorIndex(); - return this; - } - - /** - * bytes signature = 8; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return instance.getSignature(); - } - /** - * bytes signature = 8; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSignature(value); - return this; - } - /** - * bytes signature = 8; - * @return This builder for chaining. - */ - public Builder clearSignature() { - copyOnWrite(); - instance.clearSignature(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Vote) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Vote(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "type_", - "height_", - "round_", - "blockId_", - "timestamp_", - "validatorAddress_", - "validatorIndex_", - "signature_", - }; - java.lang.String info = - "\u0000\b\u0000\u0000\u0001\b\b\u0000\u0000\u0000\u0001\f\u0002\u0002\u0003\u0004" + - "\u0004\t\u0005\t\u0006\n\u0007\u0004\b\n"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Vote.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Vote) - private static final ibc.tendermint.light.TendermintLight.Vote DEFAULT_INSTANCE; - static { - Vote defaultInstance = new Vote(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Vote.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Vote getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ValidatorSetOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.ValidatorSet) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - java.util.List - getValidatorsList(); - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - ibc.tendermint.light.TendermintLight.Validator getValidators(int index); - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - int getValidatorsCount(); - - /** - * .ibc.tendermint.light.Validator proposer = 2; - * @return Whether the proposer field is set. - */ - boolean hasProposer(); - /** - * .ibc.tendermint.light.Validator proposer = 2; - * @return The proposer. - */ - ibc.tendermint.light.TendermintLight.Validator getProposer(); - - /** - * int64 total_voting_power = 3; - * @return The totalVotingPower. - */ - long getTotalVotingPower(); - } - /** - * Protobuf type {@code ibc.tendermint.light.ValidatorSet} - */ - public static final class ValidatorSet extends - com.google.protobuf.GeneratedMessageLite< - ValidatorSet, ValidatorSet.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.ValidatorSet) - ValidatorSetOrBuilder { - private ValidatorSet() { - validators_ = emptyProtobufList(); - } - public static final int VALIDATORS_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.ProtobufList validators_; - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public java.util.List getValidatorsList() { - return validators_; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public java.util.List - getValidatorsOrBuilderList() { - return validators_; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public int getValidatorsCount() { - return validators_.size(); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Validator getValidators(int index) { - return validators_.get(index); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public ibc.tendermint.light.TendermintLight.ValidatorOrBuilder getValidatorsOrBuilder( - int index) { - return validators_.get(index); - } - private void ensureValidatorsIsMutable() { - com.google.protobuf.Internal.ProtobufList tmp = validators_; - if (!tmp.isModifiable()) { - validators_ = - com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); - } - } - - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void setValidators( - int index, ibc.tendermint.light.TendermintLight.Validator value) { - value.getClass(); - ensureValidatorsIsMutable(); - validators_.set(index, value); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void addValidators(ibc.tendermint.light.TendermintLight.Validator value) { - value.getClass(); - ensureValidatorsIsMutable(); - validators_.add(value); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void addValidators( - int index, ibc.tendermint.light.TendermintLight.Validator value) { - value.getClass(); - ensureValidatorsIsMutable(); - validators_.add(index, value); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void addAllValidators( - java.lang.Iterable values) { - ensureValidatorsIsMutable(); - com.google.protobuf.AbstractMessageLite.addAll( - values, validators_); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void clearValidators() { - validators_ = emptyProtobufList(); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - private void removeValidators(int index) { - ensureValidatorsIsMutable(); - validators_.remove(index); - } - - public static final int PROPOSER_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.Validator proposer_; - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - @java.lang.Override - public boolean hasProposer() { - return proposer_ != null; - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Validator getProposer() { - return proposer_ == null ? ibc.tendermint.light.TendermintLight.Validator.getDefaultInstance() : proposer_; - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - private void setProposer(ibc.tendermint.light.TendermintLight.Validator value) { - value.getClass(); - proposer_ = value; - - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeProposer(ibc.tendermint.light.TendermintLight.Validator value) { - value.getClass(); - if (proposer_ != null && - proposer_ != ibc.tendermint.light.TendermintLight.Validator.getDefaultInstance()) { - proposer_ = - ibc.tendermint.light.TendermintLight.Validator.newBuilder(proposer_).mergeFrom(value).buildPartial(); - } else { - proposer_ = value; - } - - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - private void clearProposer() { proposer_ = null; - - } - - public static final int TOTAL_VOTING_POWER_FIELD_NUMBER = 3; - private long totalVotingPower_; - /** - * int64 total_voting_power = 3; - * @return The totalVotingPower. - */ - @java.lang.Override - public long getTotalVotingPower() { - return totalVotingPower_; - } - /** - * int64 total_voting_power = 3; - * @param value The totalVotingPower to set. - */ - private void setTotalVotingPower(long value) { - - totalVotingPower_ = value; - } - /** - * int64 total_voting_power = 3; - */ - private void clearTotalVotingPower() { - - totalVotingPower_ = 0L; - } - - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.ValidatorSet parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.ValidatorSet prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.ValidatorSet} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.ValidatorSet, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.ValidatorSet) - ibc.tendermint.light.TendermintLight.ValidatorSetOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.ValidatorSet.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public java.util.List getValidatorsList() { - return java.util.Collections.unmodifiableList( - instance.getValidatorsList()); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public int getValidatorsCount() { - return instance.getValidatorsCount(); - }/** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Validator getValidators(int index) { - return instance.getValidators(index); - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder setValidators( - int index, ibc.tendermint.light.TendermintLight.Validator value) { - copyOnWrite(); - instance.setValidators(index, value); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder setValidators( - int index, ibc.tendermint.light.TendermintLight.Validator.Builder builderForValue) { - copyOnWrite(); - instance.setValidators(index, - builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder addValidators(ibc.tendermint.light.TendermintLight.Validator value) { - copyOnWrite(); - instance.addValidators(value); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder addValidators( - int index, ibc.tendermint.light.TendermintLight.Validator value) { - copyOnWrite(); - instance.addValidators(index, value); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder addValidators( - ibc.tendermint.light.TendermintLight.Validator.Builder builderForValue) { - copyOnWrite(); - instance.addValidators(builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder addValidators( - int index, ibc.tendermint.light.TendermintLight.Validator.Builder builderForValue) { - copyOnWrite(); - instance.addValidators(index, - builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder addAllValidators( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllValidators(values); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder clearValidators() { - copyOnWrite(); - instance.clearValidators(); - return this; - } - /** - * repeated .ibc.tendermint.light.Validator validators = 1; - */ - public Builder removeValidators(int index) { - copyOnWrite(); - instance.removeValidators(index); - return this; - } - - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - @java.lang.Override - public boolean hasProposer() { - return instance.hasProposer(); - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Validator getProposer() { - return instance.getProposer(); - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - public Builder setProposer(ibc.tendermint.light.TendermintLight.Validator value) { - copyOnWrite(); - instance.setProposer(value); - return this; - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - public Builder setProposer( - ibc.tendermint.light.TendermintLight.Validator.Builder builderForValue) { - copyOnWrite(); - instance.setProposer(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - public Builder mergeProposer(ibc.tendermint.light.TendermintLight.Validator value) { - copyOnWrite(); - instance.mergeProposer(value); - return this; - } - /** - * .ibc.tendermint.light.Validator proposer = 2; - */ - public Builder clearProposer() { copyOnWrite(); - instance.clearProposer(); - return this; - } - - /** - * int64 total_voting_power = 3; - * @return The totalVotingPower. - */ - @java.lang.Override - public long getTotalVotingPower() { - return instance.getTotalVotingPower(); - } - /** - * int64 total_voting_power = 3; - * @param value The totalVotingPower to set. - * @return This builder for chaining. - */ - public Builder setTotalVotingPower(long value) { - copyOnWrite(); - instance.setTotalVotingPower(value); - return this; - } - /** - * int64 total_voting_power = 3; - * @return This builder for chaining. - */ - public Builder clearTotalVotingPower() { - copyOnWrite(); - instance.clearTotalVotingPower(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.ValidatorSet) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.ValidatorSet(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "validators_", - ibc.tendermint.light.TendermintLight.Validator.class, - "proposer_", - "totalVotingPower_", - }; - java.lang.String info = - "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u001b\u0002\t" + - "\u0003\u0002"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.ValidatorSet.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.ValidatorSet) - private static final ibc.tendermint.light.TendermintLight.ValidatorSet DEFAULT_INSTANCE; - static { - ValidatorSet defaultInstance = new ValidatorSet(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - ValidatorSet.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.ValidatorSet getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface ValidatorOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Validator) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * bytes address = 1; - * @return The address. - */ - com.google.protobuf.ByteString getAddress(); - - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - * @return Whether the pubKey field is set. - */ - boolean hasPubKey(); - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - * @return The pubKey. - */ - ibc.tendermint.light.TendermintLight.PublicKey getPubKey(); - - /** - * int64 voting_power = 3; - * @return The votingPower. - */ - long getVotingPower(); - - /** - * int64 proposer_priority = 4; - * @return The proposerPriority. - */ - long getProposerPriority(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Validator} - */ - public static final class Validator extends - com.google.protobuf.GeneratedMessageLite< - Validator, Validator.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Validator) - ValidatorOrBuilder { - private Validator() { - address_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int ADDRESS_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString address_; - /** - * bytes address = 1; - * @return The address. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAddress() { - return address_; - } - /** - * bytes address = 1; - * @param value The address to set. - */ - private void setAddress(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - address_ = value; - } - /** - * bytes address = 1; - */ - private void clearAddress() { - - address_ = getDefaultInstance().getAddress(); - } - - public static final int PUB_KEY_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.PublicKey pubKey_; - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - @java.lang.Override - public boolean hasPubKey() { - return pubKey_ != null; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PublicKey getPubKey() { - return pubKey_ == null ? ibc.tendermint.light.TendermintLight.PublicKey.getDefaultInstance() : pubKey_; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - private void setPubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - value.getClass(); - pubKey_ = value; - - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergePubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - value.getClass(); - if (pubKey_ != null && - pubKey_ != ibc.tendermint.light.TendermintLight.PublicKey.getDefaultInstance()) { - pubKey_ = - ibc.tendermint.light.TendermintLight.PublicKey.newBuilder(pubKey_).mergeFrom(value).buildPartial(); - } else { - pubKey_ = value; - } - - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - private void clearPubKey() { pubKey_ = null; - - } - - public static final int VOTING_POWER_FIELD_NUMBER = 3; - private long votingPower_; - /** - * int64 voting_power = 3; - * @return The votingPower. - */ - @java.lang.Override - public long getVotingPower() { - return votingPower_; - } - /** - * int64 voting_power = 3; - * @param value The votingPower to set. - */ - private void setVotingPower(long value) { - - votingPower_ = value; - } - /** - * int64 voting_power = 3; - */ - private void clearVotingPower() { - - votingPower_ = 0L; - } - - public static final int PROPOSER_PRIORITY_FIELD_NUMBER = 4; - private long proposerPriority_; - /** - * int64 proposer_priority = 4; - * @return The proposerPriority. - */ - @java.lang.Override - public long getProposerPriority() { - return proposerPriority_; - } - /** - * int64 proposer_priority = 4; - * @param value The proposerPriority to set. - */ - private void setProposerPriority(long value) { - - proposerPriority_ = value; - } - /** - * int64 proposer_priority = 4; - */ - private void clearProposerPriority() { - - proposerPriority_ = 0L; - } - - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Validator parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Validator parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Validator parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Validator prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Validator} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Validator, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Validator) - ibc.tendermint.light.TendermintLight.ValidatorOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Validator.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * bytes address = 1; - * @return The address. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAddress() { - return instance.getAddress(); - } - /** - * bytes address = 1; - * @param value The address to set. - * @return This builder for chaining. - */ - public Builder setAddress(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setAddress(value); - return this; - } - /** - * bytes address = 1; - * @return This builder for chaining. - */ - public Builder clearAddress() { - copyOnWrite(); - instance.clearAddress(); - return this; - } - - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - @java.lang.Override - public boolean hasPubKey() { - return instance.hasPubKey(); - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PublicKey getPubKey() { - return instance.getPubKey(); - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - public Builder setPubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - copyOnWrite(); - instance.setPubKey(value); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - public Builder setPubKey( - ibc.tendermint.light.TendermintLight.PublicKey.Builder builderForValue) { - copyOnWrite(); - instance.setPubKey(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - public Builder mergePubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - copyOnWrite(); - instance.mergePubKey(value); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 2; - */ - public Builder clearPubKey() { copyOnWrite(); - instance.clearPubKey(); - return this; - } - - /** - * int64 voting_power = 3; - * @return The votingPower. - */ - @java.lang.Override - public long getVotingPower() { - return instance.getVotingPower(); - } - /** - * int64 voting_power = 3; - * @param value The votingPower to set. - * @return This builder for chaining. - */ - public Builder setVotingPower(long value) { - copyOnWrite(); - instance.setVotingPower(value); - return this; - } - /** - * int64 voting_power = 3; - * @return This builder for chaining. - */ - public Builder clearVotingPower() { - copyOnWrite(); - instance.clearVotingPower(); - return this; - } - - /** - * int64 proposer_priority = 4; - * @return The proposerPriority. - */ - @java.lang.Override - public long getProposerPriority() { - return instance.getProposerPriority(); - } - /** - * int64 proposer_priority = 4; - * @param value The proposerPriority to set. - * @return This builder for chaining. - */ - public Builder setProposerPriority(long value) { - copyOnWrite(); - instance.setProposerPriority(value); - return this; - } - /** - * int64 proposer_priority = 4; - * @return This builder for chaining. - */ - public Builder clearProposerPriority() { - copyOnWrite(); - instance.clearProposerPriority(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Validator) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Validator(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "address_", - "pubKey_", - "votingPower_", - "proposerPriority_", - }; - java.lang.String info = - "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + - "\u0002\u0004\u0002"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Validator.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Validator) - private static final ibc.tendermint.light.TendermintLight.Validator DEFAULT_INSTANCE; - static { - Validator defaultInstance = new Validator(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Validator.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Validator getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface SimpleValidatorOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.SimpleValidator) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - * @return Whether the pubKey field is set. - */ - boolean hasPubKey(); - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - * @return The pubKey. - */ - ibc.tendermint.light.TendermintLight.PublicKey getPubKey(); - - /** - * int64 voting_power = 2; - * @return The votingPower. - */ - long getVotingPower(); - } - /** - * Protobuf type {@code ibc.tendermint.light.SimpleValidator} - */ - public static final class SimpleValidator extends - com.google.protobuf.GeneratedMessageLite< - SimpleValidator, SimpleValidator.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.SimpleValidator) - SimpleValidatorOrBuilder { - private SimpleValidator() { - } - public static final int PUB_KEY_FIELD_NUMBER = 1; - private ibc.tendermint.light.TendermintLight.PublicKey pubKey_; - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - @java.lang.Override - public boolean hasPubKey() { - return pubKey_ != null; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PublicKey getPubKey() { - return pubKey_ == null ? ibc.tendermint.light.TendermintLight.PublicKey.getDefaultInstance() : pubKey_; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - private void setPubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - value.getClass(); - pubKey_ = value; - - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergePubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - value.getClass(); - if (pubKey_ != null && - pubKey_ != ibc.tendermint.light.TendermintLight.PublicKey.getDefaultInstance()) { - pubKey_ = - ibc.tendermint.light.TendermintLight.PublicKey.newBuilder(pubKey_).mergeFrom(value).buildPartial(); - } else { - pubKey_ = value; - } - - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - private void clearPubKey() { pubKey_ = null; - - } - - public static final int VOTING_POWER_FIELD_NUMBER = 2; - private long votingPower_; - /** - * int64 voting_power = 2; - * @return The votingPower. - */ - @java.lang.Override - public long getVotingPower() { - return votingPower_; - } - /** - * int64 voting_power = 2; - * @param value The votingPower to set. - */ - private void setVotingPower(long value) { - - votingPower_ = value; - } - /** - * int64 voting_power = 2; - */ - private void clearVotingPower() { - - votingPower_ = 0L; - } - - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SimpleValidator parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.SimpleValidator prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.SimpleValidator} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.SimpleValidator, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.SimpleValidator) - ibc.tendermint.light.TendermintLight.SimpleValidatorOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.SimpleValidator.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - @java.lang.Override - public boolean hasPubKey() { - return instance.hasPubKey(); - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PublicKey getPubKey() { - return instance.getPubKey(); - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - public Builder setPubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - copyOnWrite(); - instance.setPubKey(value); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - public Builder setPubKey( - ibc.tendermint.light.TendermintLight.PublicKey.Builder builderForValue) { - copyOnWrite(); - instance.setPubKey(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - public Builder mergePubKey(ibc.tendermint.light.TendermintLight.PublicKey value) { - copyOnWrite(); - instance.mergePubKey(value); - return this; - } - /** - * .ibc.tendermint.light.PublicKey pub_key = 1; - */ - public Builder clearPubKey() { copyOnWrite(); - instance.clearPubKey(); - return this; - } - - /** - * int64 voting_power = 2; - * @return The votingPower. - */ - @java.lang.Override - public long getVotingPower() { - return instance.getVotingPower(); - } - /** - * int64 voting_power = 2; - * @param value The votingPower to set. - * @return This builder for chaining. - */ - public Builder setVotingPower(long value) { - copyOnWrite(); - instance.setVotingPower(value); - return this; - } - /** - * int64 voting_power = 2; - * @return This builder for chaining. - */ - public Builder clearVotingPower() { - copyOnWrite(); - instance.clearVotingPower(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.SimpleValidator) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.SimpleValidator(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "pubKey_", - "votingPower_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\u0002" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.SimpleValidator.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.SimpleValidator) - private static final ibc.tendermint.light.TendermintLight.SimpleValidator DEFAULT_INSTANCE; - static { - SimpleValidator defaultInstance = new SimpleValidator(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - SimpleValidator.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.SimpleValidator getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PublicKeyOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.PublicKey) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * bytes ed25519 = 1; - * @return Whether the ed25519 field is set. - */ - boolean hasEd25519(); - /** - * bytes ed25519 = 1; - * @return The ed25519. - */ - com.google.protobuf.ByteString getEd25519(); - - /** - * bytes secp256k1 = 2; - * @return Whether the secp256k1 field is set. - */ - boolean hasSecp256K1(); - /** - * bytes secp256k1 = 2; - * @return The secp256k1. - */ - com.google.protobuf.ByteString getSecp256K1(); - - /** - * bytes sr25519 = 3; - * @return Whether the sr25519 field is set. - */ - boolean hasSr25519(); - /** - * bytes sr25519 = 3; - * @return The sr25519. - */ - com.google.protobuf.ByteString getSr25519(); - - public ibc.tendermint.light.TendermintLight.PublicKey.SumCase getSumCase(); - } - /** - * Protobuf type {@code ibc.tendermint.light.PublicKey} - */ - public static final class PublicKey extends - com.google.protobuf.GeneratedMessageLite< - PublicKey, PublicKey.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.PublicKey) - PublicKeyOrBuilder { - private PublicKey() { - } - private int sumCase_ = 0; - private java.lang.Object sum_; - public enum SumCase { - ED25519(1), - SECP256K1(2), - SR25519(3), - SUM_NOT_SET(0); - private final int value; - private SumCase(int value) { - this.value = value; - } - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static SumCase valueOf(int value) { - return forNumber(value); - } - - public static SumCase forNumber(int value) { - switch (value) { - case 1: return ED25519; - case 2: return SECP256K1; - case 3: return SR25519; - case 0: return SUM_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - @java.lang.Override - public SumCase - getSumCase() { - return SumCase.forNumber( - sumCase_); - } - - private void clearSum() { - sumCase_ = 0; - sum_ = null; - } - - public static final int ED25519_FIELD_NUMBER = 1; - /** - * bytes ed25519 = 1; - * @return Whether the ed25519 field is set. - */ - @java.lang.Override - public boolean hasEd25519() { - return sumCase_ == 1; - } - /** - * bytes ed25519 = 1; - * @return The ed25519. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEd25519() { - if (sumCase_ == 1) { - return (com.google.protobuf.ByteString) sum_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * bytes ed25519 = 1; - * @param value The ed25519 to set. - */ - private void setEd25519(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - sumCase_ = 1; - sum_ = value; - } - /** - * bytes ed25519 = 1; - */ - private void clearEd25519() { - if (sumCase_ == 1) { - sumCase_ = 0; - sum_ = null; - } - } - - public static final int SECP256K1_FIELD_NUMBER = 2; - /** - * bytes secp256k1 = 2; - * @return Whether the secp256k1 field is set. - */ - @java.lang.Override - public boolean hasSecp256K1() { - return sumCase_ == 2; - } - /** - * bytes secp256k1 = 2; - * @return The secp256k1. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecp256K1() { - if (sumCase_ == 2) { - return (com.google.protobuf.ByteString) sum_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * bytes secp256k1 = 2; - * @param value The secp256k1 to set. - */ - private void setSecp256K1(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - sumCase_ = 2; - sum_ = value; - } - /** - * bytes secp256k1 = 2; - */ - private void clearSecp256K1() { - if (sumCase_ == 2) { - sumCase_ = 0; - sum_ = null; - } - } - - public static final int SR25519_FIELD_NUMBER = 3; - /** - * bytes sr25519 = 3; - * @return Whether the sr25519 field is set. - */ - @java.lang.Override - public boolean hasSr25519() { - return sumCase_ == 3; - } - /** - * bytes sr25519 = 3; - * @return The sr25519. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSr25519() { - if (sumCase_ == 3) { - return (com.google.protobuf.ByteString) sum_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - * bytes sr25519 = 3; - * @param value The sr25519 to set. - */ - private void setSr25519(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - sumCase_ = 3; - sum_ = value; - } - /** - * bytes sr25519 = 3; - */ - private void clearSr25519() { - if (sumCase_ == 3) { - sumCase_ = 0; - sum_ = null; - } - } - - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PublicKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.PublicKey prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.PublicKey} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.PublicKey, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.PublicKey) - ibc.tendermint.light.TendermintLight.PublicKeyOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.PublicKey.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - @java.lang.Override - public SumCase - getSumCase() { - return instance.getSumCase(); - } - - public Builder clearSum() { - copyOnWrite(); - instance.clearSum(); - return this; - } - - - /** - * bytes ed25519 = 1; - * @return Whether the ed25519 field is set. - */ - @java.lang.Override - public boolean hasEd25519() { - return instance.hasEd25519(); - } - /** - * bytes ed25519 = 1; - * @return The ed25519. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEd25519() { - return instance.getEd25519(); - } - /** - * bytes ed25519 = 1; - * @param value The ed25519 to set. - * @return This builder for chaining. - */ - public Builder setEd25519(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setEd25519(value); - return this; - } - /** - * bytes ed25519 = 1; - * @return This builder for chaining. - */ - public Builder clearEd25519() { - copyOnWrite(); - instance.clearEd25519(); - return this; - } - - /** - * bytes secp256k1 = 2; - * @return Whether the secp256k1 field is set. - */ - @java.lang.Override - public boolean hasSecp256K1() { - return instance.hasSecp256K1(); - } - /** - * bytes secp256k1 = 2; - * @return The secp256k1. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecp256K1() { - return instance.getSecp256K1(); - } - /** - * bytes secp256k1 = 2; - * @param value The secp256k1 to set. - * @return This builder for chaining. - */ - public Builder setSecp256K1(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSecp256K1(value); - return this; - } - /** - * bytes secp256k1 = 2; - * @return This builder for chaining. - */ - public Builder clearSecp256K1() { - copyOnWrite(); - instance.clearSecp256K1(); - return this; - } - - /** - * bytes sr25519 = 3; - * @return Whether the sr25519 field is set. - */ - @java.lang.Override - public boolean hasSr25519() { - return instance.hasSr25519(); - } - /** - * bytes sr25519 = 3; - * @return The sr25519. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSr25519() { - return instance.getSr25519(); - } - /** - * bytes sr25519 = 3; - * @param value The sr25519 to set. - * @return This builder for chaining. - */ - public Builder setSr25519(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSr25519(value); - return this; - } - /** - * bytes sr25519 = 3; - * @return This builder for chaining. - */ - public Builder clearSr25519() { - copyOnWrite(); - instance.clearSr25519(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.PublicKey) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.PublicKey(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "sum_", - "sumCase_", - }; - java.lang.String info = - "\u0000\u0003\u0001\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001=\u0000\u0002=" + - "\u0000\u0003=\u0000"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.PublicKey.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.PublicKey) - private static final ibc.tendermint.light.TendermintLight.PublicKey DEFAULT_INSTANCE; - static { - PublicKey defaultInstance = new PublicKey(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - PublicKey.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.PublicKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface PartSetHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.PartSetHeader) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * uint32 total = 1; - * @return The total. - */ - int getTotal(); - - /** - * bytes hash = 2; - * @return The hash. - */ - com.google.protobuf.ByteString getHash(); - } - /** - * Protobuf type {@code ibc.tendermint.light.PartSetHeader} - */ - public static final class PartSetHeader extends - com.google.protobuf.GeneratedMessageLite< - PartSetHeader, PartSetHeader.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.PartSetHeader) - PartSetHeaderOrBuilder { - private PartSetHeader() { - hash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int TOTAL_FIELD_NUMBER = 1; - private int total_; - /** - * uint32 total = 1; - * @return The total. - */ - @java.lang.Override - public int getTotal() { - return total_; - } - /** - * uint32 total = 1; - * @param value The total to set. - */ - private void setTotal(int value) { - - total_ = value; - } - /** - * uint32 total = 1; - */ - private void clearTotal() { - - total_ = 0; - } - - public static final int HASH_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString hash_; - /** - * bytes hash = 2; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return hash_; - } - /** - * bytes hash = 2; - * @param value The hash to set. - */ - private void setHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - hash_ = value; - } - /** - * bytes hash = 2; - */ - private void clearHash() { - - hash_ = getDefaultInstance().getHash(); - } - - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.PartSetHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.PartSetHeader prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.PartSetHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.PartSetHeader, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.PartSetHeader) - ibc.tendermint.light.TendermintLight.PartSetHeaderOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.PartSetHeader.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * uint32 total = 1; - * @return The total. - */ - @java.lang.Override - public int getTotal() { - return instance.getTotal(); - } - /** - * uint32 total = 1; - * @param value The total to set. - * @return This builder for chaining. - */ - public Builder setTotal(int value) { - copyOnWrite(); - instance.setTotal(value); - return this; - } - /** - * uint32 total = 1; - * @return This builder for chaining. - */ - public Builder clearTotal() { - copyOnWrite(); - instance.clearTotal(); - return this; - } - - /** - * bytes hash = 2; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return instance.getHash(); - } - /** - * bytes hash = 2; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setHash(value); - return this; - } - /** - * bytes hash = 2; - * @return This builder for chaining. - */ - public Builder clearHash() { - copyOnWrite(); - instance.clearHash(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.PartSetHeader) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.PartSetHeader(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "total_", - "hash_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u000b\u0002\n" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.PartSetHeader.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.PartSetHeader) - private static final ibc.tendermint.light.TendermintLight.PartSetHeader DEFAULT_INSTANCE; - static { - PartSetHeader defaultInstance = new PartSetHeader(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - PartSetHeader.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.PartSetHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface BlockIDOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.BlockID) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * bytes hash = 1; - * @return The hash. - */ - com.google.protobuf.ByteString getHash(); - - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - * @return Whether the partSetHeader field is set. - */ - boolean hasPartSetHeader(); - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - * @return The partSetHeader. - */ - ibc.tendermint.light.TendermintLight.PartSetHeader getPartSetHeader(); - } - /** - * Protobuf type {@code ibc.tendermint.light.BlockID} - */ - public static final class BlockID extends - com.google.protobuf.GeneratedMessageLite< - BlockID, BlockID.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.BlockID) - BlockIDOrBuilder { - private BlockID() { - hash_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int HASH_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString hash_; - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return hash_; - } - /** - * bytes hash = 1; - * @param value The hash to set. - */ - private void setHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - hash_ = value; - } - /** - * bytes hash = 1; - */ - private void clearHash() { - - hash_ = getDefaultInstance().getHash(); - } - - public static final int PART_SET_HEADER_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.PartSetHeader partSetHeader_; - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - @java.lang.Override - public boolean hasPartSetHeader() { - return partSetHeader_ != null; - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PartSetHeader getPartSetHeader() { - return partSetHeader_ == null ? ibc.tendermint.light.TendermintLight.PartSetHeader.getDefaultInstance() : partSetHeader_; - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - private void setPartSetHeader(ibc.tendermint.light.TendermintLight.PartSetHeader value) { - value.getClass(); - partSetHeader_ = value; - - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergePartSetHeader(ibc.tendermint.light.TendermintLight.PartSetHeader value) { - value.getClass(); - if (partSetHeader_ != null && - partSetHeader_ != ibc.tendermint.light.TendermintLight.PartSetHeader.getDefaultInstance()) { - partSetHeader_ = - ibc.tendermint.light.TendermintLight.PartSetHeader.newBuilder(partSetHeader_).mergeFrom(value).buildPartial(); - } else { - partSetHeader_ = value; - } - - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - private void clearPartSetHeader() { partSetHeader_ = null; - - } - - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.BlockID parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.BlockID prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.BlockID} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.BlockID, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.BlockID) - ibc.tendermint.light.TendermintLight.BlockIDOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.BlockID.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * bytes hash = 1; - * @return The hash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getHash() { - return instance.getHash(); - } - /** - * bytes hash = 1; - * @param value The hash to set. - * @return This builder for chaining. - */ - public Builder setHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setHash(value); - return this; - } - /** - * bytes hash = 1; - * @return This builder for chaining. - */ - public Builder clearHash() { - copyOnWrite(); - instance.clearHash(); - return this; - } - - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - @java.lang.Override - public boolean hasPartSetHeader() { - return instance.hasPartSetHeader(); - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.PartSetHeader getPartSetHeader() { - return instance.getPartSetHeader(); - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - public Builder setPartSetHeader(ibc.tendermint.light.TendermintLight.PartSetHeader value) { - copyOnWrite(); - instance.setPartSetHeader(value); - return this; - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - public Builder setPartSetHeader( - ibc.tendermint.light.TendermintLight.PartSetHeader.Builder builderForValue) { - copyOnWrite(); - instance.setPartSetHeader(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - public Builder mergePartSetHeader(ibc.tendermint.light.TendermintLight.PartSetHeader value) { - copyOnWrite(); - instance.mergePartSetHeader(value); - return this; - } - /** - * .ibc.tendermint.light.PartSetHeader part_set_header = 2; - */ - public Builder clearPartSetHeader() { copyOnWrite(); - instance.clearPartSetHeader(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.BlockID) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.BlockID(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "hash_", - "partSetHeader_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\n\u0002\t"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.BlockID.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.BlockID) - private static final ibc.tendermint.light.TendermintLight.BlockID DEFAULT_INSTANCE; - static { - BlockID defaultInstance = new BlockID(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - BlockID.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.BlockID getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface CommitOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Commit) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * int64 height = 1; - * @return The height. - */ - long getHeight(); - - /** - * int32 round = 2; - * @return The round. - */ - int getRound(); - - /** - * .ibc.tendermint.light.BlockID block_id = 3; - * @return Whether the blockId field is set. - */ - boolean hasBlockId(); - /** - * .ibc.tendermint.light.BlockID block_id = 3; - * @return The blockId. - */ - ibc.tendermint.light.TendermintLight.BlockID getBlockId(); - - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - java.util.List - getSignaturesList(); - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - ibc.tendermint.light.TendermintLight.CommitSig getSignatures(int index); - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - int getSignaturesCount(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Commit} - */ - public static final class Commit extends - com.google.protobuf.GeneratedMessageLite< - Commit, Commit.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Commit) - CommitOrBuilder { - private Commit() { - signatures_ = emptyProtobufList(); - } - public static final int HEIGHT_FIELD_NUMBER = 1; - private long height_; - /** - * int64 height = 1; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return height_; - } - /** - * int64 height = 1; - * @param value The height to set. - */ - private void setHeight(long value) { - - height_ = value; - } - /** - * int64 height = 1; - */ - private void clearHeight() { - - height_ = 0L; - } - - public static final int ROUND_FIELD_NUMBER = 2; - private int round_; - /** - * int32 round = 2; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return round_; - } - /** - * int32 round = 2; - * @param value The round to set. - */ - private void setRound(int value) { - - round_ = value; - } - /** - * int32 round = 2; - */ - private void clearRound() { - - round_ = 0; - } - - public static final int BLOCK_ID_FIELD_NUMBER = 3; - private ibc.tendermint.light.TendermintLight.BlockID blockId_; - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - @java.lang.Override - public boolean hasBlockId() { - return blockId_ != null; - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return blockId_ == null ? ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance() : blockId_; - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - private void setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - blockId_ = value; - - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - if (blockId_ != null && - blockId_ != ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance()) { - blockId_ = - ibc.tendermint.light.TendermintLight.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); - } else { - blockId_ = value; - } - - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - private void clearBlockId() { blockId_ = null; - - } - - public static final int SIGNATURES_FIELD_NUMBER = 4; - private com.google.protobuf.Internal.ProtobufList signatures_; - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return signatures_; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public java.util.List - getSignaturesOrBuilderList() { - return signatures_; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public int getSignaturesCount() { - return signatures_.size(); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.CommitSig getSignatures(int index) { - return signatures_.get(index); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public ibc.tendermint.light.TendermintLight.CommitSigOrBuilder getSignaturesOrBuilder( - int index) { - return signatures_.get(index); - } - private void ensureSignaturesIsMutable() { - com.google.protobuf.Internal.ProtobufList tmp = signatures_; - if (!tmp.isModifiable()) { - signatures_ = - com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); - } - } - - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void setSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig value) { - value.getClass(); - ensureSignaturesIsMutable(); - signatures_.set(index, value); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void addSignatures(ibc.tendermint.light.TendermintLight.CommitSig value) { - value.getClass(); - ensureSignaturesIsMutable(); - signatures_.add(value); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void addSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig value) { - value.getClass(); - ensureSignaturesIsMutable(); - signatures_.add(index, value); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void addAllSignatures( - java.lang.Iterable values) { - ensureSignaturesIsMutable(); - com.google.protobuf.AbstractMessageLite.addAll( - values, signatures_); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void clearSignatures() { - signatures_ = emptyProtobufList(); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - private void removeSignatures(int index) { - ensureSignaturesIsMutable(); - signatures_.remove(index); - } - - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Commit parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Commit parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Commit parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Commit prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Commit} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Commit, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Commit) - ibc.tendermint.light.TendermintLight.CommitOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Commit.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * int64 height = 1; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return instance.getHeight(); - } - /** - * int64 height = 1; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(long value) { - copyOnWrite(); - instance.setHeight(value); - return this; - } - /** - * int64 height = 1; - * @return This builder for chaining. - */ - public Builder clearHeight() { - copyOnWrite(); - instance.clearHeight(); - return this; - } - - /** - * int32 round = 2; - * @return The round. - */ - @java.lang.Override - public int getRound() { - return instance.getRound(); - } - /** - * int32 round = 2; - * @param value The round to set. - * @return This builder for chaining. - */ - public Builder setRound(int value) { - copyOnWrite(); - instance.setRound(value); - return this; - } - /** - * int32 round = 2; - * @return This builder for chaining. - */ - public Builder clearRound() { - copyOnWrite(); - instance.clearRound(); - return this; - } - - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - @java.lang.Override - public boolean hasBlockId() { - return instance.hasBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getBlockId() { - return instance.getBlockId(); - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - public Builder setBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.setBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - public Builder setBlockId( - ibc.tendermint.light.TendermintLight.BlockID.Builder builderForValue) { - copyOnWrite(); - instance.setBlockId(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - public Builder mergeBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.mergeBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID block_id = 3; - */ - public Builder clearBlockId() { copyOnWrite(); - instance.clearBlockId(); - return this; - } - - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public java.util.List getSignaturesList() { - return java.util.Collections.unmodifiableList( - instance.getSignaturesList()); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public int getSignaturesCount() { - return instance.getSignaturesCount(); - }/** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.CommitSig getSignatures(int index) { - return instance.getSignatures(index); - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder setSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig value) { - copyOnWrite(); - instance.setSignatures(index, value); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder setSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig.Builder builderForValue) { - copyOnWrite(); - instance.setSignatures(index, - builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder addSignatures(ibc.tendermint.light.TendermintLight.CommitSig value) { - copyOnWrite(); - instance.addSignatures(value); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder addSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig value) { - copyOnWrite(); - instance.addSignatures(index, value); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder addSignatures( - ibc.tendermint.light.TendermintLight.CommitSig.Builder builderForValue) { - copyOnWrite(); - instance.addSignatures(builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder addSignatures( - int index, ibc.tendermint.light.TendermintLight.CommitSig.Builder builderForValue) { - copyOnWrite(); - instance.addSignatures(index, - builderForValue.build()); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder addAllSignatures( - java.lang.Iterable values) { - copyOnWrite(); - instance.addAllSignatures(values); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder clearSignatures() { - copyOnWrite(); - instance.clearSignatures(); - return this; - } - /** - * repeated .ibc.tendermint.light.CommitSig signatures = 4; - */ - public Builder removeSignatures(int index) { - copyOnWrite(); - instance.removeSignatures(index); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Commit) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Commit(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "height_", - "round_", - "blockId_", - "signatures_", - ibc.tendermint.light.TendermintLight.CommitSig.class, - }; - java.lang.String info = - "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\u0002\u0002\u0004" + - "\u0003\t\u0004\u001b"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Commit.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Commit) - private static final ibc.tendermint.light.TendermintLight.Commit DEFAULT_INSTANCE; - static { - Commit defaultInstance = new Commit(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Commit.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Commit getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface CommitSigOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.CommitSig) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The enum numeric value on the wire for blockIdFlag. - */ - int getBlockIdFlagValue(); - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The blockIdFlag. - */ - ibc.tendermint.light.TendermintLight.BlockIDFlag getBlockIdFlag(); - - /** - * bytes validator_address = 2; - * @return The validatorAddress. - */ - com.google.protobuf.ByteString getValidatorAddress(); - - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - * @return Whether the timestamp field is set. - */ - boolean hasTimestamp(); - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - * @return The timestamp. - */ - ibc.tendermint.light.TendermintLight.Timestamp getTimestamp(); - - /** - * bytes signature = 4; - * @return The signature. - */ - com.google.protobuf.ByteString getSignature(); - } - /** - *
-   * CommitSig is a part of the Vote included in a Commit.
-   * 
- * - * Protobuf type {@code ibc.tendermint.light.CommitSig} - */ - public static final class CommitSig extends - com.google.protobuf.GeneratedMessageLite< - CommitSig, CommitSig.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.CommitSig) - CommitSigOrBuilder { - private CommitSig() { - validatorAddress_ = com.google.protobuf.ByteString.EMPTY; - signature_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int BLOCK_ID_FLAG_FIELD_NUMBER = 1; - private int blockIdFlag_; - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The enum numeric value on the wire for blockIdFlag. - */ - @java.lang.Override - public int getBlockIdFlagValue() { - return blockIdFlag_; - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The blockIdFlag. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockIDFlag getBlockIdFlag() { - ibc.tendermint.light.TendermintLight.BlockIDFlag result = ibc.tendermint.light.TendermintLight.BlockIDFlag.forNumber(blockIdFlag_); - return result == null ? ibc.tendermint.light.TendermintLight.BlockIDFlag.UNRECOGNIZED : result; - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @param value The enum numeric value on the wire for blockIdFlag to set. - */ - private void setBlockIdFlagValue(int value) { - blockIdFlag_ = value; - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @param value The blockIdFlag to set. - */ - private void setBlockIdFlag(ibc.tendermint.light.TendermintLight.BlockIDFlag value) { - blockIdFlag_ = value.getNumber(); - - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - */ - private void clearBlockIdFlag() { - - blockIdFlag_ = 0; - } - - public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString validatorAddress_; - /** - * bytes validator_address = 2; - * @return The validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorAddress() { - return validatorAddress_; - } - /** - * bytes validator_address = 2; - * @param value The validatorAddress to set. - */ - private void setValidatorAddress(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - validatorAddress_ = value; - } - /** - * bytes validator_address = 2; - */ - private void clearValidatorAddress() { - - validatorAddress_ = getDefaultInstance().getValidatorAddress(); - } - - public static final int TIMESTAMP_FIELD_NUMBER = 3; - private ibc.tendermint.light.TendermintLight.Timestamp timestamp_; - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - @java.lang.Override - public boolean hasTimestamp() { - return timestamp_ != null; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return timestamp_ == null ? ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance() : timestamp_; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - private void setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - timestamp_ = value; - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - if (timestamp_ != null && - timestamp_ != ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance()) { - timestamp_ = - ibc.tendermint.light.TendermintLight.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); - } else { - timestamp_ = value; - } - - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - private void clearTimestamp() { timestamp_ = null; - - } - - public static final int SIGNATURE_FIELD_NUMBER = 4; - private com.google.protobuf.ByteString signature_; - /** - * bytes signature = 4; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return signature_; - } - /** - * bytes signature = 4; - * @param value The signature to set. - */ - private void setSignature(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - signature_ = value; - } - /** - * bytes signature = 4; - */ - private void clearSignature() { - - signature_ = getDefaultInstance().getSignature(); - } - - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.CommitSig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.CommitSig prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - *
-     * CommitSig is a part of the Vote included in a Commit.
-     * 
- * - * Protobuf type {@code ibc.tendermint.light.CommitSig} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.CommitSig, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.CommitSig) - ibc.tendermint.light.TendermintLight.CommitSigOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.CommitSig.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The enum numeric value on the wire for blockIdFlag. - */ - @java.lang.Override - public int getBlockIdFlagValue() { - return instance.getBlockIdFlagValue(); - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @param value The blockIdFlag to set. - * @return This builder for chaining. - */ - public Builder setBlockIdFlagValue(int value) { - copyOnWrite(); - instance.setBlockIdFlagValue(value); - return this; - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return The blockIdFlag. - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockIDFlag getBlockIdFlag() { - return instance.getBlockIdFlag(); - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @param value The enum numeric value on the wire for blockIdFlag to set. - * @return This builder for chaining. - */ - public Builder setBlockIdFlag(ibc.tendermint.light.TendermintLight.BlockIDFlag value) { - copyOnWrite(); - instance.setBlockIdFlag(value); - return this; - } - /** - * .ibc.tendermint.light.BlockIDFlag block_id_flag = 1; - * @return This builder for chaining. - */ - public Builder clearBlockIdFlag() { - copyOnWrite(); - instance.clearBlockIdFlag(); - return this; - } - - /** - * bytes validator_address = 2; - * @return The validatorAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorAddress() { - return instance.getValidatorAddress(); - } - /** - * bytes validator_address = 2; - * @param value The validatorAddress to set. - * @return This builder for chaining. - */ - public Builder setValidatorAddress(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setValidatorAddress(value); - return this; - } - /** - * bytes validator_address = 2; - * @return This builder for chaining. - */ - public Builder clearValidatorAddress() { - copyOnWrite(); - instance.clearValidatorAddress(); - return this; - } - - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - @java.lang.Override - public boolean hasTimestamp() { - return instance.hasTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTimestamp() { - return instance.getTimestamp(); - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - public Builder setTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.setTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - public Builder setTimestamp( - ibc.tendermint.light.TendermintLight.Timestamp.Builder builderForValue) { - copyOnWrite(); - instance.setTimestamp(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - public Builder mergeTimestamp(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.mergeTimestamp(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp timestamp = 3; - */ - public Builder clearTimestamp() { copyOnWrite(); - instance.clearTimestamp(); - return this; - } - - /** - * bytes signature = 4; - * @return The signature. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSignature() { - return instance.getSignature(); - } - /** - * bytes signature = 4; - * @param value The signature to set. - * @return This builder for chaining. - */ - public Builder setSignature(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setSignature(value); - return this; - } - /** - * bytes signature = 4; - * @return This builder for chaining. - */ - public Builder clearSignature() { - copyOnWrite(); - instance.clearSignature(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.CommitSig) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.CommitSig(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "blockIdFlag_", - "validatorAddress_", - "timestamp_", - "signature_", - }; - java.lang.String info = - "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\f\u0002\n\u0003" + - "\t\u0004\n"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.CommitSig.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.CommitSig) - private static final ibc.tendermint.light.TendermintLight.CommitSig DEFAULT_INSTANCE; - static { - CommitSig defaultInstance = new CommitSig(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - CommitSig.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.CommitSig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.Timestamp) - com.google.protobuf.MessageLiteOrBuilder { - - /** - *
-     * Represents seconds of UTC time since Unix epoch
-     * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-     * 9999-12-31T23:59:59Z inclusive.
-     * 
- * - * int64 seconds = 1; - * @return The seconds. - */ - long getSeconds(); - - /** - *
-     * Non-negative fractions of a second at nanosecond resolution. Negative
-     * second values with fractions must still have non-negative nanos values
-     * that count forward in time. Must be from 0 to 999,999,999
-     * inclusive.
-     * 
- * - * int32 nanos = 2; - * @return The nanos. - */ - int getNanos(); - } - /** - * Protobuf type {@code ibc.tendermint.light.Timestamp} - */ - public static final class Timestamp extends - com.google.protobuf.GeneratedMessageLite< - Timestamp, Timestamp.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.Timestamp) - TimestampOrBuilder { - private Timestamp() { - } - public static final int SECONDS_FIELD_NUMBER = 1; - private long seconds_; - /** - *
-     * Represents seconds of UTC time since Unix epoch
-     * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-     * 9999-12-31T23:59:59Z inclusive.
-     * 
- * - * int64 seconds = 1; - * @return The seconds. - */ - @java.lang.Override - public long getSeconds() { - return seconds_; - } - /** - *
-     * Represents seconds of UTC time since Unix epoch
-     * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-     * 9999-12-31T23:59:59Z inclusive.
-     * 
- * - * int64 seconds = 1; - * @param value The seconds to set. - */ - private void setSeconds(long value) { - - seconds_ = value; - } - /** - *
-     * Represents seconds of UTC time since Unix epoch
-     * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-     * 9999-12-31T23:59:59Z inclusive.
-     * 
- * - * int64 seconds = 1; - */ - private void clearSeconds() { - - seconds_ = 0L; - } - - public static final int NANOS_FIELD_NUMBER = 2; - private int nanos_; - /** - *
-     * Non-negative fractions of a second at nanosecond resolution. Negative
-     * second values with fractions must still have non-negative nanos values
-     * that count forward in time. Must be from 0 to 999,999,999
-     * inclusive.
-     * 
- * - * int32 nanos = 2; - * @return The nanos. - */ - @java.lang.Override - public int getNanos() { - return nanos_; - } - /** - *
-     * Non-negative fractions of a second at nanosecond resolution. Negative
-     * second values with fractions must still have non-negative nanos values
-     * that count forward in time. Must be from 0 to 999,999,999
-     * inclusive.
-     * 
- * - * int32 nanos = 2; - * @param value The nanos to set. - */ - private void setNanos(int value) { - - nanos_ = value; - } - /** - *
-     * Non-negative fractions of a second at nanosecond resolution. Negative
-     * second values with fractions must still have non-negative nanos values
-     * that count forward in time. Must be from 0 to 999,999,999
-     * inclusive.
-     * 
- * - * int32 nanos = 2; - */ - private void clearNanos() { - - nanos_ = 0; - } - - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.Timestamp prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.Timestamp} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.Timestamp, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.Timestamp) - ibc.tendermint.light.TendermintLight.TimestampOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.Timestamp.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - *
-       * Represents seconds of UTC time since Unix epoch
-       * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-       * 9999-12-31T23:59:59Z inclusive.
-       * 
- * - * int64 seconds = 1; - * @return The seconds. - */ - @java.lang.Override - public long getSeconds() { - return instance.getSeconds(); - } - /** - *
-       * Represents seconds of UTC time since Unix epoch
-       * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-       * 9999-12-31T23:59:59Z inclusive.
-       * 
- * - * int64 seconds = 1; - * @param value The seconds to set. - * @return This builder for chaining. - */ - public Builder setSeconds(long value) { - copyOnWrite(); - instance.setSeconds(value); - return this; - } - /** - *
-       * Represents seconds of UTC time since Unix epoch
-       * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
-       * 9999-12-31T23:59:59Z inclusive.
-       * 
- * - * int64 seconds = 1; - * @return This builder for chaining. - */ - public Builder clearSeconds() { - copyOnWrite(); - instance.clearSeconds(); - return this; - } - - /** - *
-       * Non-negative fractions of a second at nanosecond resolution. Negative
-       * second values with fractions must still have non-negative nanos values
-       * that count forward in time. Must be from 0 to 999,999,999
-       * inclusive.
-       * 
- * - * int32 nanos = 2; - * @return The nanos. - */ - @java.lang.Override - public int getNanos() { - return instance.getNanos(); - } - /** - *
-       * Non-negative fractions of a second at nanosecond resolution. Negative
-       * second values with fractions must still have non-negative nanos values
-       * that count forward in time. Must be from 0 to 999,999,999
-       * inclusive.
-       * 
- * - * int32 nanos = 2; - * @param value The nanos to set. - * @return This builder for chaining. - */ - public Builder setNanos(int value) { - copyOnWrite(); - instance.setNanos(value); - return this; - } - /** - *
-       * Non-negative fractions of a second at nanosecond resolution. Negative
-       * second values with fractions must still have non-negative nanos values
-       * that count forward in time. Must be from 0 to 999,999,999
-       * inclusive.
-       * 
- * - * int32 nanos = 2; - * @return This builder for chaining. - */ - public Builder clearNanos() { - copyOnWrite(); - instance.clearNanos(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.Timestamp) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.Timestamp(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "seconds_", - "nanos_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0002\u0002\u0004" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.Timestamp.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.Timestamp) - private static final ibc.tendermint.light.TendermintLight.Timestamp DEFAULT_INSTANCE; - static { - Timestamp defaultInstance = new Timestamp(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - Timestamp.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.Timestamp getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface LightHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.LightHeader) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.Consensus version = 1; - * @return Whether the version field is set. - */ - boolean hasVersion(); - /** - * .ibc.tendermint.light.Consensus version = 1; - * @return The version. - */ - ibc.tendermint.light.TendermintLight.Consensus getVersion(); - - /** - * string chain_id = 2; - * @return The chainId. - */ - java.lang.String getChainId(); - /** - * string chain_id = 2; - * @return The bytes for chainId. - */ - com.google.protobuf.ByteString - getChainIdBytes(); - - /** - * int64 height = 3; - * @return The height. - */ - long getHeight(); - - /** - * .ibc.tendermint.light.Timestamp time = 4; - * @return Whether the time field is set. - */ - boolean hasTime(); - /** - * .ibc.tendermint.light.Timestamp time = 4; - * @return The time. - */ - ibc.tendermint.light.TendermintLight.Timestamp getTime(); - - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - * @return Whether the lastBlockId field is set. - */ - boolean hasLastBlockId(); - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - * @return The lastBlockId. - */ - ibc.tendermint.light.TendermintLight.BlockID getLastBlockId(); - - /** - *
-     * commit from validators from the last block
-     * 
- * - * bytes last_commit_hash = 6; - * @return The lastCommitHash. - */ - com.google.protobuf.ByteString getLastCommitHash(); - - /** - *
-     * transactions
-     * 
- * - * bytes data_hash = 7; - * @return The dataHash. - */ - com.google.protobuf.ByteString getDataHash(); - - /** - *
-     * validators for the current block
-     * 
- * - * bytes validators_hash = 8; - * @return The validatorsHash. - */ - com.google.protobuf.ByteString getValidatorsHash(); - - /** - *
-     * validators for the next block
-     * 
- * - * bytes next_validators_hash = 9; - * @return The nextValidatorsHash. - */ - com.google.protobuf.ByteString getNextValidatorsHash(); - - /** - *
-     * consensus params for current block
-     * 
- * - * bytes consensus_hash = 10; - * @return The consensusHash. - */ - com.google.protobuf.ByteString getConsensusHash(); - - /** - *
-     * state after txs from the previous block
-     * 
- * - * bytes app_hash = 11; - * @return The appHash. - */ - com.google.protobuf.ByteString getAppHash(); - - /** - *
-     * root hash of all results from the txs from the previous block
-     * 
- * - * bytes last_results_hash = 12; - * @return The lastResultsHash. - */ - com.google.protobuf.ByteString getLastResultsHash(); - - /** - *
-     * evidence included in the block
-     * 
- * - * bytes evidence_hash = 13; - * @return The evidenceHash. - */ - com.google.protobuf.ByteString getEvidenceHash(); - - /** - *
-     * original proposer of the block
-     * 
- * - * bytes proposer_address = 14; - * @return The proposerAddress. - */ - com.google.protobuf.ByteString getProposerAddress(); - } - /** - * Protobuf type {@code ibc.tendermint.light.LightHeader} - */ - public static final class LightHeader extends - com.google.protobuf.GeneratedMessageLite< - LightHeader, LightHeader.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.LightHeader) - LightHeaderOrBuilder { - private LightHeader() { - chainId_ = ""; - lastCommitHash_ = com.google.protobuf.ByteString.EMPTY; - dataHash_ = com.google.protobuf.ByteString.EMPTY; - validatorsHash_ = com.google.protobuf.ByteString.EMPTY; - nextValidatorsHash_ = com.google.protobuf.ByteString.EMPTY; - consensusHash_ = com.google.protobuf.ByteString.EMPTY; - appHash_ = com.google.protobuf.ByteString.EMPTY; - lastResultsHash_ = com.google.protobuf.ByteString.EMPTY; - evidenceHash_ = com.google.protobuf.ByteString.EMPTY; - proposerAddress_ = com.google.protobuf.ByteString.EMPTY; - } - public static final int VERSION_FIELD_NUMBER = 1; - private ibc.tendermint.light.TendermintLight.Consensus version_; - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - @java.lang.Override - public boolean hasVersion() { - return version_ != null; - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Consensus getVersion() { - return version_ == null ? ibc.tendermint.light.TendermintLight.Consensus.getDefaultInstance() : version_; - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - private void setVersion(ibc.tendermint.light.TendermintLight.Consensus value) { - value.getClass(); - version_ = value; - - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeVersion(ibc.tendermint.light.TendermintLight.Consensus value) { - value.getClass(); - if (version_ != null && - version_ != ibc.tendermint.light.TendermintLight.Consensus.getDefaultInstance()) { - version_ = - ibc.tendermint.light.TendermintLight.Consensus.newBuilder(version_).mergeFrom(value).buildPartial(); - } else { - version_ = value; - } - - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - private void clearVersion() { version_ = null; - - } - - public static final int CHAIN_ID_FIELD_NUMBER = 2; - private java.lang.String chainId_; - /** - * string chain_id = 2; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return chainId_; - } - /** - * string chain_id = 2; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return com.google.protobuf.ByteString.copyFromUtf8(chainId_); - } - /** - * string chain_id = 2; - * @param value The chainId to set. - */ - private void setChainId( - java.lang.String value) { - java.lang.Class valueClass = value.getClass(); - - chainId_ = value; - } - /** - * string chain_id = 2; - */ - private void clearChainId() { - - chainId_ = getDefaultInstance().getChainId(); - } - /** - * string chain_id = 2; - * @param value The bytes for chainId to set. - */ - private void setChainIdBytes( - com.google.protobuf.ByteString value) { - checkByteStringIsUtf8(value); - chainId_ = value.toStringUtf8(); - - } - - public static final int HEIGHT_FIELD_NUMBER = 3; - private long height_; - /** - * int64 height = 3; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return height_; - } - /** - * int64 height = 3; - * @param value The height to set. - */ - private void setHeight(long value) { - - height_ = value; - } - /** - * int64 height = 3; - */ - private void clearHeight() { - - height_ = 0L; - } - - public static final int TIME_FIELD_NUMBER = 4; - private ibc.tendermint.light.TendermintLight.Timestamp time_; - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - @java.lang.Override - public boolean hasTime() { - return time_ != null; - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTime() { - return time_ == null ? ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance() : time_; - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - private void setTime(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - time_ = value; - - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTime(ibc.tendermint.light.TendermintLight.Timestamp value) { - value.getClass(); - if (time_ != null && - time_ != ibc.tendermint.light.TendermintLight.Timestamp.getDefaultInstance()) { - time_ = - ibc.tendermint.light.TendermintLight.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial(); - } else { - time_ = value; - } - - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - private void clearTime() { time_ = null; - - } - - public static final int LAST_BLOCK_ID_FIELD_NUMBER = 5; - private ibc.tendermint.light.TendermintLight.BlockID lastBlockId_; - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - @java.lang.Override - public boolean hasLastBlockId() { - return lastBlockId_ != null; - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getLastBlockId() { - return lastBlockId_ == null ? ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance() : lastBlockId_; - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - private void setLastBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - lastBlockId_ = value; - - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeLastBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - value.getClass(); - if (lastBlockId_ != null && - lastBlockId_ != ibc.tendermint.light.TendermintLight.BlockID.getDefaultInstance()) { - lastBlockId_ = - ibc.tendermint.light.TendermintLight.BlockID.newBuilder(lastBlockId_).mergeFrom(value).buildPartial(); - } else { - lastBlockId_ = value; - } - - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - private void clearLastBlockId() { lastBlockId_ = null; - - } - - public static final int LAST_COMMIT_HASH_FIELD_NUMBER = 6; - private com.google.protobuf.ByteString lastCommitHash_; - /** - *
-     * commit from validators from the last block
-     * 
- * - * bytes last_commit_hash = 6; - * @return The lastCommitHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLastCommitHash() { - return lastCommitHash_; - } - /** - *
-     * commit from validators from the last block
-     * 
- * - * bytes last_commit_hash = 6; - * @param value The lastCommitHash to set. - */ - private void setLastCommitHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - lastCommitHash_ = value; - } - /** - *
-     * commit from validators from the last block
-     * 
- * - * bytes last_commit_hash = 6; - */ - private void clearLastCommitHash() { - - lastCommitHash_ = getDefaultInstance().getLastCommitHash(); - } - - public static final int DATA_HASH_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString dataHash_; - /** - *
-     * transactions
-     * 
- * - * bytes data_hash = 7; - * @return The dataHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataHash() { - return dataHash_; - } - /** - *
-     * transactions
-     * 
- * - * bytes data_hash = 7; - * @param value The dataHash to set. - */ - private void setDataHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - dataHash_ = value; - } - /** - *
-     * transactions
-     * 
- * - * bytes data_hash = 7; - */ - private void clearDataHash() { - - dataHash_ = getDefaultInstance().getDataHash(); - } - - public static final int VALIDATORS_HASH_FIELD_NUMBER = 8; - private com.google.protobuf.ByteString validatorsHash_; - /** - *
-     * validators for the current block
-     * 
- * - * bytes validators_hash = 8; - * @return The validatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorsHash() { - return validatorsHash_; - } - /** - *
-     * validators for the current block
-     * 
- * - * bytes validators_hash = 8; - * @param value The validatorsHash to set. - */ - private void setValidatorsHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - validatorsHash_ = value; - } - /** - *
-     * validators for the current block
-     * 
- * - * bytes validators_hash = 8; - */ - private void clearValidatorsHash() { - - validatorsHash_ = getDefaultInstance().getValidatorsHash(); - } - - public static final int NEXT_VALIDATORS_HASH_FIELD_NUMBER = 9; - private com.google.protobuf.ByteString nextValidatorsHash_; - /** - *
-     * validators for the next block
-     * 
- * - * bytes next_validators_hash = 9; - * @return The nextValidatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextValidatorsHash() { - return nextValidatorsHash_; - } - /** - *
-     * validators for the next block
-     * 
- * - * bytes next_validators_hash = 9; - * @param value The nextValidatorsHash to set. - */ - private void setNextValidatorsHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - nextValidatorsHash_ = value; - } - /** - *
-     * validators for the next block
-     * 
- * - * bytes next_validators_hash = 9; - */ - private void clearNextValidatorsHash() { - - nextValidatorsHash_ = getDefaultInstance().getNextValidatorsHash(); - } - - public static final int CONSENSUS_HASH_FIELD_NUMBER = 10; - private com.google.protobuf.ByteString consensusHash_; - /** - *
-     * consensus params for current block
-     * 
- * - * bytes consensus_hash = 10; - * @return The consensusHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConsensusHash() { - return consensusHash_; - } - /** - *
-     * consensus params for current block
-     * 
- * - * bytes consensus_hash = 10; - * @param value The consensusHash to set. - */ - private void setConsensusHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - consensusHash_ = value; - } - /** - *
-     * consensus params for current block
-     * 
- * - * bytes consensus_hash = 10; - */ - private void clearConsensusHash() { - - consensusHash_ = getDefaultInstance().getConsensusHash(); - } - - public static final int APP_HASH_FIELD_NUMBER = 11; - private com.google.protobuf.ByteString appHash_; - /** - *
-     * state after txs from the previous block
-     * 
- * - * bytes app_hash = 11; - * @return The appHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAppHash() { - return appHash_; - } - /** - *
-     * state after txs from the previous block
-     * 
- * - * bytes app_hash = 11; - * @param value The appHash to set. - */ - private void setAppHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - appHash_ = value; - } - /** - *
-     * state after txs from the previous block
-     * 
- * - * bytes app_hash = 11; - */ - private void clearAppHash() { - - appHash_ = getDefaultInstance().getAppHash(); - } - - public static final int LAST_RESULTS_HASH_FIELD_NUMBER = 12; - private com.google.protobuf.ByteString lastResultsHash_; - /** - *
-     * root hash of all results from the txs from the previous block
-     * 
- * - * bytes last_results_hash = 12; - * @return The lastResultsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLastResultsHash() { - return lastResultsHash_; - } - /** - *
-     * root hash of all results from the txs from the previous block
-     * 
- * - * bytes last_results_hash = 12; - * @param value The lastResultsHash to set. - */ - private void setLastResultsHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - lastResultsHash_ = value; - } - /** - *
-     * root hash of all results from the txs from the previous block
-     * 
- * - * bytes last_results_hash = 12; - */ - private void clearLastResultsHash() { - - lastResultsHash_ = getDefaultInstance().getLastResultsHash(); - } - - public static final int EVIDENCE_HASH_FIELD_NUMBER = 13; - private com.google.protobuf.ByteString evidenceHash_; - /** - *
-     * evidence included in the block
-     * 
- * - * bytes evidence_hash = 13; - * @return The evidenceHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEvidenceHash() { - return evidenceHash_; - } - /** - *
-     * evidence included in the block
-     * 
- * - * bytes evidence_hash = 13; - * @param value The evidenceHash to set. - */ - private void setEvidenceHash(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - evidenceHash_ = value; - } - /** - *
-     * evidence included in the block
-     * 
- * - * bytes evidence_hash = 13; - */ - private void clearEvidenceHash() { - - evidenceHash_ = getDefaultInstance().getEvidenceHash(); - } - - public static final int PROPOSER_ADDRESS_FIELD_NUMBER = 14; - private com.google.protobuf.ByteString proposerAddress_; - /** - *
-     * original proposer of the block
-     * 
- * - * bytes proposer_address = 14; - * @return The proposerAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProposerAddress() { - return proposerAddress_; - } - /** - *
-     * original proposer of the block
-     * 
- * - * bytes proposer_address = 14; - * @param value The proposerAddress to set. - */ - private void setProposerAddress(com.google.protobuf.ByteString value) { - java.lang.Class valueClass = value.getClass(); - - proposerAddress_ = value; - } - /** - *
-     * original proposer of the block
-     * 
- * - * bytes proposer_address = 14; - */ - private void clearProposerAddress() { - - proposerAddress_ = getDefaultInstance().getProposerAddress(); - } - - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.LightHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.LightHeader prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.LightHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.LightHeader, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.LightHeader) - ibc.tendermint.light.TendermintLight.LightHeaderOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.LightHeader.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - @java.lang.Override - public boolean hasVersion() { - return instance.hasVersion(); - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Consensus getVersion() { - return instance.getVersion(); - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - public Builder setVersion(ibc.tendermint.light.TendermintLight.Consensus value) { - copyOnWrite(); - instance.setVersion(value); - return this; - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - public Builder setVersion( - ibc.tendermint.light.TendermintLight.Consensus.Builder builderForValue) { - copyOnWrite(); - instance.setVersion(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - public Builder mergeVersion(ibc.tendermint.light.TendermintLight.Consensus value) { - copyOnWrite(); - instance.mergeVersion(value); - return this; - } - /** - * .ibc.tendermint.light.Consensus version = 1; - */ - public Builder clearVersion() { copyOnWrite(); - instance.clearVersion(); - return this; - } - - /** - * string chain_id = 2; - * @return The chainId. - */ - @java.lang.Override - public java.lang.String getChainId() { - return instance.getChainId(); - } - /** - * string chain_id = 2; - * @return The bytes for chainId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getChainIdBytes() { - return instance.getChainIdBytes(); - } - /** - * string chain_id = 2; - * @param value The chainId to set. - * @return This builder for chaining. - */ - public Builder setChainId( - java.lang.String value) { - copyOnWrite(); - instance.setChainId(value); - return this; - } - /** - * string chain_id = 2; - * @return This builder for chaining. - */ - public Builder clearChainId() { - copyOnWrite(); - instance.clearChainId(); - return this; - } - /** - * string chain_id = 2; - * @param value The bytes for chainId to set. - * @return This builder for chaining. - */ - public Builder setChainIdBytes( - com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setChainIdBytes(value); - return this; - } - - /** - * int64 height = 3; - * @return The height. - */ - @java.lang.Override - public long getHeight() { - return instance.getHeight(); - } - /** - * int64 height = 3; - * @param value The height to set. - * @return This builder for chaining. - */ - public Builder setHeight(long value) { - copyOnWrite(); - instance.setHeight(value); - return this; - } - /** - * int64 height = 3; - * @return This builder for chaining. - */ - public Builder clearHeight() { - copyOnWrite(); - instance.clearHeight(); - return this; - } - - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - @java.lang.Override - public boolean hasTime() { - return instance.hasTime(); - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Timestamp getTime() { - return instance.getTime(); - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - public Builder setTime(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.setTime(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - public Builder setTime( - ibc.tendermint.light.TendermintLight.Timestamp.Builder builderForValue) { - copyOnWrite(); - instance.setTime(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - public Builder mergeTime(ibc.tendermint.light.TendermintLight.Timestamp value) { - copyOnWrite(); - instance.mergeTime(value); - return this; - } - /** - * .ibc.tendermint.light.Timestamp time = 4; - */ - public Builder clearTime() { copyOnWrite(); - instance.clearTime(); - return this; - } - - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - @java.lang.Override - public boolean hasLastBlockId() { - return instance.hasLastBlockId(); - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.BlockID getLastBlockId() { - return instance.getLastBlockId(); - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - public Builder setLastBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.setLastBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - public Builder setLastBlockId( - ibc.tendermint.light.TendermintLight.BlockID.Builder builderForValue) { - copyOnWrite(); - instance.setLastBlockId(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - public Builder mergeLastBlockId(ibc.tendermint.light.TendermintLight.BlockID value) { - copyOnWrite(); - instance.mergeLastBlockId(value); - return this; - } - /** - * .ibc.tendermint.light.BlockID last_block_id = 5; - */ - public Builder clearLastBlockId() { copyOnWrite(); - instance.clearLastBlockId(); - return this; - } - - /** - *
-       * commit from validators from the last block
-       * 
- * - * bytes last_commit_hash = 6; - * @return The lastCommitHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLastCommitHash() { - return instance.getLastCommitHash(); - } - /** - *
-       * commit from validators from the last block
-       * 
- * - * bytes last_commit_hash = 6; - * @param value The lastCommitHash to set. - * @return This builder for chaining. - */ - public Builder setLastCommitHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setLastCommitHash(value); - return this; - } - /** - *
-       * commit from validators from the last block
-       * 
- * - * bytes last_commit_hash = 6; - * @return This builder for chaining. - */ - public Builder clearLastCommitHash() { - copyOnWrite(); - instance.clearLastCommitHash(); - return this; - } - - /** - *
-       * transactions
-       * 
- * - * bytes data_hash = 7; - * @return The dataHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataHash() { - return instance.getDataHash(); - } - /** - *
-       * transactions
-       * 
- * - * bytes data_hash = 7; - * @param value The dataHash to set. - * @return This builder for chaining. - */ - public Builder setDataHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setDataHash(value); - return this; - } - /** - *
-       * transactions
-       * 
- * - * bytes data_hash = 7; - * @return This builder for chaining. - */ - public Builder clearDataHash() { - copyOnWrite(); - instance.clearDataHash(); - return this; - } - - /** - *
-       * validators for the current block
-       * 
- * - * bytes validators_hash = 8; - * @return The validatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getValidatorsHash() { - return instance.getValidatorsHash(); - } - /** - *
-       * validators for the current block
-       * 
- * - * bytes validators_hash = 8; - * @param value The validatorsHash to set. - * @return This builder for chaining. - */ - public Builder setValidatorsHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setValidatorsHash(value); - return this; - } - /** - *
-       * validators for the current block
-       * 
- * - * bytes validators_hash = 8; - * @return This builder for chaining. - */ - public Builder clearValidatorsHash() { - copyOnWrite(); - instance.clearValidatorsHash(); - return this; - } - - /** - *
-       * validators for the next block
-       * 
- * - * bytes next_validators_hash = 9; - * @return The nextValidatorsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextValidatorsHash() { - return instance.getNextValidatorsHash(); - } - /** - *
-       * validators for the next block
-       * 
- * - * bytes next_validators_hash = 9; - * @param value The nextValidatorsHash to set. - * @return This builder for chaining. - */ - public Builder setNextValidatorsHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setNextValidatorsHash(value); - return this; - } - /** - *
-       * validators for the next block
-       * 
- * - * bytes next_validators_hash = 9; - * @return This builder for chaining. - */ - public Builder clearNextValidatorsHash() { - copyOnWrite(); - instance.clearNextValidatorsHash(); - return this; - } - - /** - *
-       * consensus params for current block
-       * 
- * - * bytes consensus_hash = 10; - * @return The consensusHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getConsensusHash() { - return instance.getConsensusHash(); - } - /** - *
-       * consensus params for current block
-       * 
- * - * bytes consensus_hash = 10; - * @param value The consensusHash to set. - * @return This builder for chaining. - */ - public Builder setConsensusHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setConsensusHash(value); - return this; - } - /** - *
-       * consensus params for current block
-       * 
- * - * bytes consensus_hash = 10; - * @return This builder for chaining. - */ - public Builder clearConsensusHash() { - copyOnWrite(); - instance.clearConsensusHash(); - return this; - } - - /** - *
-       * state after txs from the previous block
-       * 
- * - * bytes app_hash = 11; - * @return The appHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAppHash() { - return instance.getAppHash(); - } - /** - *
-       * state after txs from the previous block
-       * 
- * - * bytes app_hash = 11; - * @param value The appHash to set. - * @return This builder for chaining. - */ - public Builder setAppHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setAppHash(value); - return this; - } - /** - *
-       * state after txs from the previous block
-       * 
- * - * bytes app_hash = 11; - * @return This builder for chaining. - */ - public Builder clearAppHash() { - copyOnWrite(); - instance.clearAppHash(); - return this; - } - - /** - *
-       * root hash of all results from the txs from the previous block
-       * 
- * - * bytes last_results_hash = 12; - * @return The lastResultsHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getLastResultsHash() { - return instance.getLastResultsHash(); - } - /** - *
-       * root hash of all results from the txs from the previous block
-       * 
- * - * bytes last_results_hash = 12; - * @param value The lastResultsHash to set. - * @return This builder for chaining. - */ - public Builder setLastResultsHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setLastResultsHash(value); - return this; - } - /** - *
-       * root hash of all results from the txs from the previous block
-       * 
- * - * bytes last_results_hash = 12; - * @return This builder for chaining. - */ - public Builder clearLastResultsHash() { - copyOnWrite(); - instance.clearLastResultsHash(); - return this; - } - - /** - *
-       * evidence included in the block
-       * 
- * - * bytes evidence_hash = 13; - * @return The evidenceHash. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEvidenceHash() { - return instance.getEvidenceHash(); - } - /** - *
-       * evidence included in the block
-       * 
- * - * bytes evidence_hash = 13; - * @param value The evidenceHash to set. - * @return This builder for chaining. - */ - public Builder setEvidenceHash(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setEvidenceHash(value); - return this; - } - /** - *
-       * evidence included in the block
-       * 
- * - * bytes evidence_hash = 13; - * @return This builder for chaining. - */ - public Builder clearEvidenceHash() { - copyOnWrite(); - instance.clearEvidenceHash(); - return this; - } - - /** - *
-       * original proposer of the block
-       * 
- * - * bytes proposer_address = 14; - * @return The proposerAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProposerAddress() { - return instance.getProposerAddress(); - } - /** - *
-       * original proposer of the block
-       * 
- * - * bytes proposer_address = 14; - * @param value The proposerAddress to set. - * @return This builder for chaining. - */ - public Builder setProposerAddress(com.google.protobuf.ByteString value) { - copyOnWrite(); - instance.setProposerAddress(value); - return this; - } - /** - *
-       * original proposer of the block
-       * 
- * - * bytes proposer_address = 14; - * @return This builder for chaining. - */ - public Builder clearProposerAddress() { - copyOnWrite(); - instance.clearProposerAddress(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.LightHeader) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.LightHeader(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "version_", - "chainId_", - "height_", - "time_", - "lastBlockId_", - "lastCommitHash_", - "dataHash_", - "validatorsHash_", - "nextValidatorsHash_", - "consensusHash_", - "appHash_", - "lastResultsHash_", - "evidenceHash_", - "proposerAddress_", - }; - java.lang.String info = - "\u0000\u000e\u0000\u0000\u0001\u000e\u000e\u0000\u0000\u0000\u0001\t\u0002\u0208" + - "\u0003\u0002\u0004\t\u0005\t\u0006\n\u0007\n\b\n\t\n\n\n\u000b\n\f\n\r\n\u000e\n" + - ""; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.LightHeader.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.LightHeader) - private static final ibc.tendermint.light.TendermintLight.LightHeader DEFAULT_INSTANCE; - static { - LightHeader defaultInstance = new LightHeader(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - LightHeader.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.LightHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface SignedHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.SignedHeader) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.LightHeader header = 1; - * @return Whether the header field is set. - */ - boolean hasHeader(); - /** - * .ibc.tendermint.light.LightHeader header = 1; - * @return The header. - */ - ibc.tendermint.light.TendermintLight.LightHeader getHeader(); - - /** - * .ibc.tendermint.light.Commit commit = 2; - * @return Whether the commit field is set. - */ - boolean hasCommit(); - /** - * .ibc.tendermint.light.Commit commit = 2; - * @return The commit. - */ - ibc.tendermint.light.TendermintLight.Commit getCommit(); - } - /** - * Protobuf type {@code ibc.tendermint.light.SignedHeader} - */ - public static final class SignedHeader extends - com.google.protobuf.GeneratedMessageLite< - SignedHeader, SignedHeader.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.SignedHeader) - SignedHeaderOrBuilder { - private SignedHeader() { - } - public static final int HEADER_FIELD_NUMBER = 1; - private ibc.tendermint.light.TendermintLight.LightHeader header_; - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - @java.lang.Override - public boolean hasHeader() { - return header_ != null; - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.LightHeader getHeader() { - return header_ == null ? ibc.tendermint.light.TendermintLight.LightHeader.getDefaultInstance() : header_; - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - private void setHeader(ibc.tendermint.light.TendermintLight.LightHeader value) { - value.getClass(); - header_ = value; - - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeHeader(ibc.tendermint.light.TendermintLight.LightHeader value) { - value.getClass(); - if (header_ != null && - header_ != ibc.tendermint.light.TendermintLight.LightHeader.getDefaultInstance()) { - header_ = - ibc.tendermint.light.TendermintLight.LightHeader.newBuilder(header_).mergeFrom(value).buildPartial(); - } else { - header_ = value; - } - - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - private void clearHeader() { header_ = null; - - } - - public static final int COMMIT_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.Commit commit_; - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - @java.lang.Override - public boolean hasCommit() { - return commit_ != null; - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Commit getCommit() { - return commit_ == null ? ibc.tendermint.light.TendermintLight.Commit.getDefaultInstance() : commit_; - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - private void setCommit(ibc.tendermint.light.TendermintLight.Commit value) { - value.getClass(); - commit_ = value; - - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeCommit(ibc.tendermint.light.TendermintLight.Commit value) { - value.getClass(); - if (commit_ != null && - commit_ != ibc.tendermint.light.TendermintLight.Commit.getDefaultInstance()) { - commit_ = - ibc.tendermint.light.TendermintLight.Commit.newBuilder(commit_).mergeFrom(value).buildPartial(); - } else { - commit_ = value; - } - - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - private void clearCommit() { commit_ = null; - - } - - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.SignedHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.SignedHeader prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.SignedHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.SignedHeader, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.SignedHeader) - ibc.tendermint.light.TendermintLight.SignedHeaderOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.SignedHeader.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - @java.lang.Override - public boolean hasHeader() { - return instance.hasHeader(); - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.LightHeader getHeader() { - return instance.getHeader(); - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - public Builder setHeader(ibc.tendermint.light.TendermintLight.LightHeader value) { - copyOnWrite(); - instance.setHeader(value); - return this; - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - public Builder setHeader( - ibc.tendermint.light.TendermintLight.LightHeader.Builder builderForValue) { - copyOnWrite(); - instance.setHeader(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - public Builder mergeHeader(ibc.tendermint.light.TendermintLight.LightHeader value) { - copyOnWrite(); - instance.mergeHeader(value); - return this; - } - /** - * .ibc.tendermint.light.LightHeader header = 1; - */ - public Builder clearHeader() { copyOnWrite(); - instance.clearHeader(); - return this; - } - - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - @java.lang.Override - public boolean hasCommit() { - return instance.hasCommit(); - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.Commit getCommit() { - return instance.getCommit(); - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - public Builder setCommit(ibc.tendermint.light.TendermintLight.Commit value) { - copyOnWrite(); - instance.setCommit(value); - return this; - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - public Builder setCommit( - ibc.tendermint.light.TendermintLight.Commit.Builder builderForValue) { - copyOnWrite(); - instance.setCommit(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - public Builder mergeCommit(ibc.tendermint.light.TendermintLight.Commit value) { - copyOnWrite(); - instance.mergeCommit(value); - return this; - } - /** - * .ibc.tendermint.light.Commit commit = 2; - */ - public Builder clearCommit() { copyOnWrite(); - instance.clearCommit(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.SignedHeader) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.SignedHeader(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "header_", - "commit_", - }; - java.lang.String info = - "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\t"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.SignedHeader.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.SignedHeader) - private static final ibc.tendermint.light.TendermintLight.SignedHeader DEFAULT_INSTANCE; - static { - SignedHeader defaultInstance = new SignedHeader(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - SignedHeader.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.SignedHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - public interface TmHeaderOrBuilder extends - // @@protoc_insertion_point(interface_extends:ibc.tendermint.light.TmHeader) - com.google.protobuf.MessageLiteOrBuilder { - - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - * @return Whether the signedHeader field is set. - */ - boolean hasSignedHeader(); - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - * @return The signedHeader. - */ - ibc.tendermint.light.TendermintLight.SignedHeader getSignedHeader(); - - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - * @return Whether the validatorSet field is set. - */ - boolean hasValidatorSet(); - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - * @return The validatorSet. - */ - ibc.tendermint.light.TendermintLight.ValidatorSet getValidatorSet(); - - /** - * int64 trusted_height = 3; - * @return The trustedHeight. - */ - long getTrustedHeight(); - - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - * @return Whether the trustedValidators field is set. - */ - boolean hasTrustedValidators(); - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - * @return The trustedValidators. - */ - ibc.tendermint.light.TendermintLight.ValidatorSet getTrustedValidators(); - } - /** - * Protobuf type {@code ibc.tendermint.light.TmHeader} - */ - public static final class TmHeader extends - com.google.protobuf.GeneratedMessageLite< - TmHeader, TmHeader.Builder> implements - // @@protoc_insertion_point(message_implements:ibc.tendermint.light.TmHeader) - TmHeaderOrBuilder { - private TmHeader() { - } - public static final int SIGNED_HEADER_FIELD_NUMBER = 1; - private ibc.tendermint.light.TendermintLight.SignedHeader signedHeader_; - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - @java.lang.Override - public boolean hasSignedHeader() { - return signedHeader_ != null; - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedHeader getSignedHeader() { - return signedHeader_ == null ? ibc.tendermint.light.TendermintLight.SignedHeader.getDefaultInstance() : signedHeader_; - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - private void setSignedHeader(ibc.tendermint.light.TendermintLight.SignedHeader value) { - value.getClass(); - signedHeader_ = value; - - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeSignedHeader(ibc.tendermint.light.TendermintLight.SignedHeader value) { - value.getClass(); - if (signedHeader_ != null && - signedHeader_ != ibc.tendermint.light.TendermintLight.SignedHeader.getDefaultInstance()) { - signedHeader_ = - ibc.tendermint.light.TendermintLight.SignedHeader.newBuilder(signedHeader_).mergeFrom(value).buildPartial(); - } else { - signedHeader_ = value; - } - - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - private void clearSignedHeader() { signedHeader_ = null; - - } - - public static final int VALIDATOR_SET_FIELD_NUMBER = 2; - private ibc.tendermint.light.TendermintLight.ValidatorSet validatorSet_; - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - @java.lang.Override - public boolean hasValidatorSet() { - return validatorSet_ != null; - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.ValidatorSet getValidatorSet() { - return validatorSet_ == null ? ibc.tendermint.light.TendermintLight.ValidatorSet.getDefaultInstance() : validatorSet_; - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - private void setValidatorSet(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - value.getClass(); - validatorSet_ = value; - - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeValidatorSet(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - value.getClass(); - if (validatorSet_ != null && - validatorSet_ != ibc.tendermint.light.TendermintLight.ValidatorSet.getDefaultInstance()) { - validatorSet_ = - ibc.tendermint.light.TendermintLight.ValidatorSet.newBuilder(validatorSet_).mergeFrom(value).buildPartial(); - } else { - validatorSet_ = value; - } - - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - private void clearValidatorSet() { validatorSet_ = null; - - } - - public static final int TRUSTED_HEIGHT_FIELD_NUMBER = 3; - private long trustedHeight_; - /** - * int64 trusted_height = 3; - * @return The trustedHeight. - */ - @java.lang.Override - public long getTrustedHeight() { - return trustedHeight_; - } - /** - * int64 trusted_height = 3; - * @param value The trustedHeight to set. - */ - private void setTrustedHeight(long value) { - - trustedHeight_ = value; - } - /** - * int64 trusted_height = 3; - */ - private void clearTrustedHeight() { - - trustedHeight_ = 0L; - } - - public static final int TRUSTED_VALIDATORS_FIELD_NUMBER = 4; - private ibc.tendermint.light.TendermintLight.ValidatorSet trustedValidators_; - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - @java.lang.Override - public boolean hasTrustedValidators() { - return trustedValidators_ != null; - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.ValidatorSet getTrustedValidators() { - return trustedValidators_ == null ? ibc.tendermint.light.TendermintLight.ValidatorSet.getDefaultInstance() : trustedValidators_; - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - private void setTrustedValidators(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - value.getClass(); - trustedValidators_ = value; - - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - @java.lang.SuppressWarnings({"ReferenceEquality"}) - private void mergeTrustedValidators(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - value.getClass(); - if (trustedValidators_ != null && - trustedValidators_ != ibc.tendermint.light.TendermintLight.ValidatorSet.getDefaultInstance()) { - trustedValidators_ = - ibc.tendermint.light.TendermintLight.ValidatorSet.newBuilder(trustedValidators_).mergeFrom(value).buildPartial(); - } else { - trustedValidators_ = value; - } - - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - private void clearTrustedValidators() { trustedValidators_ = null; - - } - - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, data, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input); - } - public static ibc.tendermint.light.TendermintLight.TmHeader parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageLite.parseFrom( - DEFAULT_INSTANCE, input, extensionRegistry); - } - - public static Builder newBuilder() { - return (Builder) DEFAULT_INSTANCE.createBuilder(); - } - public static Builder newBuilder(ibc.tendermint.light.TendermintLight.TmHeader prototype) { - return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); - } - - /** - * Protobuf type {@code ibc.tendermint.light.TmHeader} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - ibc.tendermint.light.TendermintLight.TmHeader, Builder> implements - // @@protoc_insertion_point(builder_implements:ibc.tendermint.light.TmHeader) - ibc.tendermint.light.TendermintLight.TmHeaderOrBuilder { - // Construct using ibc.tendermint.light.TendermintLight.TmHeader.newBuilder() - private Builder() { - super(DEFAULT_INSTANCE); - } - - - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - @java.lang.Override - public boolean hasSignedHeader() { - return instance.hasSignedHeader(); - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.SignedHeader getSignedHeader() { - return instance.getSignedHeader(); - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - public Builder setSignedHeader(ibc.tendermint.light.TendermintLight.SignedHeader value) { - copyOnWrite(); - instance.setSignedHeader(value); - return this; - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - public Builder setSignedHeader( - ibc.tendermint.light.TendermintLight.SignedHeader.Builder builderForValue) { - copyOnWrite(); - instance.setSignedHeader(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - public Builder mergeSignedHeader(ibc.tendermint.light.TendermintLight.SignedHeader value) { - copyOnWrite(); - instance.mergeSignedHeader(value); - return this; - } - /** - * .ibc.tendermint.light.SignedHeader signed_header = 1; - */ - public Builder clearSignedHeader() { copyOnWrite(); - instance.clearSignedHeader(); - return this; - } - - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - @java.lang.Override - public boolean hasValidatorSet() { - return instance.hasValidatorSet(); - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.ValidatorSet getValidatorSet() { - return instance.getValidatorSet(); - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - public Builder setValidatorSet(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - copyOnWrite(); - instance.setValidatorSet(value); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - public Builder setValidatorSet( - ibc.tendermint.light.TendermintLight.ValidatorSet.Builder builderForValue) { - copyOnWrite(); - instance.setValidatorSet(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - public Builder mergeValidatorSet(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - copyOnWrite(); - instance.mergeValidatorSet(value); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet validator_set = 2; - */ - public Builder clearValidatorSet() { copyOnWrite(); - instance.clearValidatorSet(); - return this; - } - - /** - * int64 trusted_height = 3; - * @return The trustedHeight. - */ - @java.lang.Override - public long getTrustedHeight() { - return instance.getTrustedHeight(); - } - /** - * int64 trusted_height = 3; - * @param value The trustedHeight to set. - * @return This builder for chaining. - */ - public Builder setTrustedHeight(long value) { - copyOnWrite(); - instance.setTrustedHeight(value); - return this; - } - /** - * int64 trusted_height = 3; - * @return This builder for chaining. - */ - public Builder clearTrustedHeight() { - copyOnWrite(); - instance.clearTrustedHeight(); - return this; - } - - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - @java.lang.Override - public boolean hasTrustedValidators() { - return instance.hasTrustedValidators(); - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - @java.lang.Override - public ibc.tendermint.light.TendermintLight.ValidatorSet getTrustedValidators() { - return instance.getTrustedValidators(); - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - public Builder setTrustedValidators(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - copyOnWrite(); - instance.setTrustedValidators(value); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - public Builder setTrustedValidators( - ibc.tendermint.light.TendermintLight.ValidatorSet.Builder builderForValue) { - copyOnWrite(); - instance.setTrustedValidators(builderForValue.build()); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - public Builder mergeTrustedValidators(ibc.tendermint.light.TendermintLight.ValidatorSet value) { - copyOnWrite(); - instance.mergeTrustedValidators(value); - return this; - } - /** - * .ibc.tendermint.light.ValidatorSet trusted_validators = 4; - */ - public Builder clearTrustedValidators() { copyOnWrite(); - instance.clearTrustedValidators(); - return this; - } - - // @@protoc_insertion_point(builder_scope:ibc.tendermint.light.TmHeader) - } - @java.lang.Override - @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) - protected final java.lang.Object dynamicMethod( - com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, - java.lang.Object arg0, java.lang.Object arg1) { - switch (method) { - case NEW_MUTABLE_INSTANCE: { - return new ibc.tendermint.light.TendermintLight.TmHeader(); - } - case NEW_BUILDER: { - return new Builder(); - } - case BUILD_MESSAGE_INFO: { - java.lang.Object[] objects = new java.lang.Object[] { - "signedHeader_", - "validatorSet_", - "trustedHeight_", - "trustedValidators_", - }; - java.lang.String info = - "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + - "\u0002\u0004\t"; - return newMessageInfo(DEFAULT_INSTANCE, info, objects); - } - // fall through - case GET_DEFAULT_INSTANCE: { - return DEFAULT_INSTANCE; - } - case GET_PARSER: { - com.google.protobuf.Parser parser = PARSER; - if (parser == null) { - synchronized (ibc.tendermint.light.TendermintLight.TmHeader.class) { - parser = PARSER; - if (parser == null) { - parser = - new DefaultInstanceBasedParser( - DEFAULT_INSTANCE); - PARSER = parser; - } - } - } - return parser; - } - case GET_MEMOIZED_IS_INITIALIZED: { - return (byte) 1; - } - case SET_MEMOIZED_IS_INITIALIZED: { - return null; - } - } - throw new UnsupportedOperationException(); - } - - - // @@protoc_insertion_point(class_scope:ibc.tendermint.light.TmHeader) - private static final ibc.tendermint.light.TendermintLight.TmHeader DEFAULT_INSTANCE; - static { - TmHeader defaultInstance = new TmHeader(); - // New instances are implicitly immutable so no need to make - // immutable. - DEFAULT_INSTANCE = defaultInstance; - com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( - TmHeader.class, defaultInstance); - } - - public static ibc.tendermint.light.TendermintLight.TmHeader getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static volatile com.google.protobuf.Parser PARSER; - - public static com.google.protobuf.Parser parser() { - return DEFAULT_INSTANCE.getParserForType(); - } - } - - - static { - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/amino/AminoProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/amino/AminoProto.java new file mode 100644 index 000000000..1c6320b6c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/amino/AminoProto.java @@ -0,0 +1,161 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: amino/amino.proto + +package com.amino; + +public final class AminoProto { + private AminoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.amino.AminoProto.name); + registry.add(com.amino.AminoProto.messageEncoding); + registry.add(com.amino.AminoProto.encoding); + registry.add(com.amino.AminoProto.fieldName); + registry.add(com.amino.AminoProto.dontOmitempty); + } + public static final int NAME_FIELD_NUMBER = 11110001; + /** + *
+   * name is the string used when registering a concrete
+   * type into the Amino type registry, via the Amino codec's
+   * `RegisterConcrete()` method. This string MUST be at most 39
+   * characters long, or else the message will be rejected by the
+   * Ledger hardware device.
+   * 
+ * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.String> name = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + "", + null, + null, + 11110001, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int MESSAGE_ENCODING_FIELD_NUMBER = 11110002; + /** + *
+   * encoding describes the encoding format used by Amino for the given
+   * message. The field type is chosen to be a string for
+   * flexibility, but it should ideally be short and expected to be
+   * machine-readable, for example "base64" or "utf8_json". We
+   * highly recommend to use underscores for word separation instead of spaces.
+   * If left empty, then the Amino encoding is expected to be the same as the
+   * Protobuf one.
+   * This annotation should not be confused with the `encoding`
+   * one which operates on the field level.
+   * 
+ * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.String> messageEncoding = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + "", + null, + null, + 11110002, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int ENCODING_FIELD_NUMBER = 11110003; + /** + *
+   * encoding describes the encoding format used by Amino for
+   * the given field. The field type is chosen to be a string for
+   * flexibility, but it should ideally be short and expected to be
+   * machine-readable, for example "base64" or "utf8_json". We
+   * highly recommend to use underscores for word separation instead of spaces.
+   * If left empty, then the Amino encoding is expected to be the same as the
+   * Protobuf one.
+   * This annotation should not be confused with the
+   * `message_encoding` one which operates on the message level.
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> encoding = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 11110003, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int FIELD_NAME_FIELD_NUMBER = 11110004; + /** + *
+   * field_name sets a different field name (i.e. key name) in
+   * the amino JSON object for the given field.
+   * Example:
+   * message Foo {
+   *   string bar = 1 [(amino.field_name) = "baz"];
+   * }
+   * Then the Amino encoding of Foo will be:
+   * `{"baz":"some value"}`
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> fieldName = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 11110004, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int DONT_OMITEMPTY_FIELD_NUMBER = 11110005; + /** + *
+   * dont_omitempty sets the field in the JSON object even if
+   * its value is empty, i.e. equal to the Golang zero value. To learn what
+   * the zero values are, see https://go.dev/ref/spec#The_zero_value.
+   * Fields default to `omitempty`, which is the default behavior when this
+   * annotation is unset. When set to true, then the field value in the
+   * JSON object will be set, i.e. not `undefined`.
+   * Example:
+   * message Foo {
+   *   string bar = 1;
+   *   string baz = 2 [(amino.dont_omitempty) = true];
+   * }
+   * f := Foo{};
+   * out := AminoJSONEncoder(&f);
+   * out == {"baz":""}
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> dontOmitempty = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 11110005, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntry.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntry.java new file mode 100644 index 000000000..6ffe33479 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntry.java @@ -0,0 +1,447 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ * Use BatchEntry not CommitmentProof, to avoid recursion
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.BatchEntry} + */ +public final class BatchEntry extends + com.google.protobuf.GeneratedMessageLite< + BatchEntry, BatchEntry.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.BatchEntry) + BatchEntryOrBuilder { + private BatchEntry() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.cosmos.ics23.v1.ExistenceProof) proof_; + } + return com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.ExistenceProof.newBuilder((com.cosmos.ics23.v1.ExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.NonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.cosmos.ics23.v1.NonExistenceProof) proof_; + } + return com.cosmos.ics23.v1.NonExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.cosmos.ics23.v1.NonExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.NonExistenceProof.newBuilder((com.cosmos.ics23.v1.NonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchEntry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.BatchEntry prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Use BatchEntry not CommitmentProof, to avoid recursion
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.BatchEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.BatchEntry, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.BatchEntry) + com.cosmos.ics23.v1.BatchEntryOrBuilder { + // Construct using com.cosmos.ics23.v1.BatchEntry.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getExist() { + return instance.getExist(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.cosmos.ics23.v1.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.NonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.cosmos.ics23.v1.NonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.BatchEntry) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.BatchEntry(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.cosmos.ics23.v1.ExistenceProof.class, + com.cosmos.ics23.v1.NonExistenceProof.class, + }; + java.lang.String info = + "\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.BatchEntry.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.BatchEntry) + private static final com.cosmos.ics23.v1.BatchEntry DEFAULT_INSTANCE; + static { + BatchEntry defaultInstance = new BatchEntry(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BatchEntry.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.BatchEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntryOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntryOrBuilder.java new file mode 100644 index 000000000..ea263439f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchEntryOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface BatchEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.BatchEntry) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.cosmos.ics23.v1.ExistenceProof getExist(); + + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.cosmos.ics23.v1.NonExistenceProof getNonexist(); + + public com.cosmos.ics23.v1.BatchEntry.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProof.java new file mode 100644 index 000000000..b2b7a525b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProof.java @@ -0,0 +1,390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ *BatchProof is a group of multiple proof types than can be compressed
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.BatchProof} + */ +public final class BatchProof extends + com.google.protobuf.GeneratedMessageLite< + BatchProof, BatchProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.BatchProof) + BatchProofOrBuilder { + private BatchProof() { + entries_ = emptyProtobufList(); + } + public static final int ENTRIES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList entries_; + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.BatchEntry getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public com.cosmos.ics23.v1.BatchEntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + private void ensureEntriesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = entries_; + if (!tmp.isModifiable()) { + entries_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void setEntries( + int index, com.cosmos.ics23.v1.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.set(index, value); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries(com.cosmos.ics23.v1.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(value); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries( + int index, com.cosmos.ics23.v1.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(index, value); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addAllEntries( + java.lang.Iterable values) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, entries_); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void clearEntries() { + entries_ = emptyProtobufList(); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void removeEntries(int index) { + ensureEntriesIsMutable(); + entries_.remove(index); + } + + public static com.cosmos.ics23.v1.BatchProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.BatchProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.BatchProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *BatchProof is a group of multiple proof types than can be compressed
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.BatchProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.BatchProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.BatchProof) + com.cosmos.ics23.v1.BatchProofOrBuilder { + // Construct using com.cosmos.ics23.v1.BatchProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return java.util.Collections.unmodifiableList( + instance.getEntriesList()); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return instance.getEntriesCount(); + }/** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.BatchEntry getEntries(int index) { + return instance.getEntries(index); + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.cosmos.ics23.v1.BatchEntry value) { + copyOnWrite(); + instance.setEntries(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.cosmos.ics23.v1.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.setEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries(com.cosmos.ics23.v1.BatchEntry value) { + copyOnWrite(); + instance.addEntries(value); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.cosmos.ics23.v1.BatchEntry value) { + copyOnWrite(); + instance.addEntries(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + com.cosmos.ics23.v1.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.cosmos.ics23.v1.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllEntries(values); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder clearEntries() { + copyOnWrite(); + instance.clearEntries(); + return this; + } + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder removeEntries(int index) { + copyOnWrite(); + instance.removeEntries(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.BatchProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.BatchProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "entries_", + com.cosmos.ics23.v1.BatchEntry.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.BatchProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.BatchProof) + private static final com.cosmos.ics23.v1.BatchProof DEFAULT_INSTANCE; + static { + BatchProof defaultInstance = new BatchProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BatchProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.BatchProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProofOrBuilder.java new file mode 100644 index 000000000..871c307d4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/BatchProofOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface BatchProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.BatchProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + java.util.List + getEntriesList(); + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + com.cosmos.ics23.v1.BatchEntry getEntries(int index); + /** + * repeated .cosmos.ics23.v1.BatchEntry entries = 1 [json_name = "entries"]; + */ + int getEntriesCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProof.java new file mode 100644 index 000000000..1ba141c0d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProof.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ *CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.CommitmentProof} + */ +public final class CommitmentProof extends + com.google.protobuf.GeneratedMessageLite< + CommitmentProof, CommitmentProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.CommitmentProof) + CommitmentProofOrBuilder { + private CommitmentProof() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + BATCH(3), + COMPRESSED(4), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 3: return BATCH; + case 4: return COMPRESSED; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.cosmos.ics23.v1.ExistenceProof) proof_; + } + return com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.ExistenceProof.newBuilder((com.cosmos.ics23.v1.ExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.NonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.cosmos.ics23.v1.NonExistenceProof) proof_; + } + return com.cosmos.ics23.v1.NonExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.cosmos.ics23.v1.NonExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.NonExistenceProof.newBuilder((com.cosmos.ics23.v1.NonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int BATCH_FIELD_NUMBER = 3; + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public boolean hasBatch() { + return proofCase_ == 3; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.BatchProof getBatch() { + if (proofCase_ == 3) { + return (com.cosmos.ics23.v1.BatchProof) proof_; + } + return com.cosmos.ics23.v1.BatchProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + private void setBatch(com.cosmos.ics23.v1.BatchProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 3; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + private void mergeBatch(com.cosmos.ics23.v1.BatchProof value) { + value.getClass(); + if (proofCase_ == 3 && + proof_ != com.cosmos.ics23.v1.BatchProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.BatchProof.newBuilder((com.cosmos.ics23.v1.BatchProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 3; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + private void clearBatch() { + if (proofCase_ == 3) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int COMPRESSED_FIELD_NUMBER = 4; + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public boolean hasCompressed() { + return proofCase_ == 4; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedBatchProof getCompressed() { + if (proofCase_ == 4) { + return (com.cosmos.ics23.v1.CompressedBatchProof) proof_; + } + return com.cosmos.ics23.v1.CompressedBatchProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void setCompressed(com.cosmos.ics23.v1.CompressedBatchProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 4; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void mergeCompressed(com.cosmos.ics23.v1.CompressedBatchProof value) { + value.getClass(); + if (proofCase_ == 4 && + proof_ != com.cosmos.ics23.v1.CompressedBatchProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.CompressedBatchProof.newBuilder((com.cosmos.ics23.v1.CompressedBatchProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 4; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void clearCompressed() { + if (proofCase_ == 4) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CommitmentProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CommitmentProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CommitmentProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.CommitmentProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.CommitmentProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.CommitmentProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.CommitmentProof) + com.cosmos.ics23.v1.CommitmentProofOrBuilder { + // Construct using com.cosmos.ics23.v1.CommitmentProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getExist() { + return instance.getExist(); + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.cosmos.ics23.v1.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.NonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.cosmos.ics23.v1.NonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.cosmos.ics23.v1.NonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public boolean hasBatch() { + return instance.hasBatch(); + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.BatchProof getBatch() { + return instance.getBatch(); + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder setBatch(com.cosmos.ics23.v1.BatchProof value) { + copyOnWrite(); + instance.setBatch(value); + return this; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder setBatch( + com.cosmos.ics23.v1.BatchProof.Builder builderForValue) { + copyOnWrite(); + instance.setBatch(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder mergeBatch(com.cosmos.ics23.v1.BatchProof value) { + copyOnWrite(); + instance.mergeBatch(value); + return this; + } + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder clearBatch() { + copyOnWrite(); + instance.clearBatch(); + return this; + } + + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public boolean hasCompressed() { + return instance.hasCompressed(); + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedBatchProof getCompressed() { + return instance.getCompressed(); + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder setCompressed(com.cosmos.ics23.v1.CompressedBatchProof value) { + copyOnWrite(); + instance.setCompressed(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder setCompressed( + com.cosmos.ics23.v1.CompressedBatchProof.Builder builderForValue) { + copyOnWrite(); + instance.setCompressed(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder mergeCompressed(com.cosmos.ics23.v1.CompressedBatchProof value) { + copyOnWrite(); + instance.mergeCompressed(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder clearCompressed() { + copyOnWrite(); + instance.clearCompressed(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.CommitmentProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.CommitmentProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.cosmos.ics23.v1.ExistenceProof.class, + com.cosmos.ics23.v1.NonExistenceProof.class, + com.cosmos.ics23.v1.BatchProof.class, + com.cosmos.ics23.v1.CompressedBatchProof.class, + }; + java.lang.String info = + "\u0000\u0004\u0001\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000\u0003<\u0000\u0004<\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.CommitmentProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.CommitmentProof) + private static final com.cosmos.ics23.v1.CommitmentProof DEFAULT_INSTANCE; + static { + CommitmentProof defaultInstance = new CommitmentProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CommitmentProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.CommitmentProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProofOrBuilder.java new file mode 100644 index 000000000..49bfb5fe1 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CommitmentProofOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface CommitmentProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.CommitmentProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .cosmos.ics23.v1.ExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.cosmos.ics23.v1.ExistenceProof getExist(); + + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .cosmos.ics23.v1.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.cosmos.ics23.v1.NonExistenceProof getNonexist(); + + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + * @return Whether the batch field is set. + */ + boolean hasBatch(); + /** + * .cosmos.ics23.v1.BatchProof batch = 3 [json_name = "batch"]; + * @return The batch. + */ + com.cosmos.ics23.v1.BatchProof getBatch(); + + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + * @return Whether the compressed field is set. + */ + boolean hasCompressed(); + /** + * .cosmos.ics23.v1.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + * @return The compressed. + */ + com.cosmos.ics23.v1.CompressedBatchProof getCompressed(); + + public com.cosmos.ics23.v1.CommitmentProof.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntry.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntry.java new file mode 100644 index 000000000..07532b53d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntry.java @@ -0,0 +1,447 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ * Use BatchEntry not CommitmentProof, to avoid recursion
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.CompressedBatchEntry} + */ +public final class CompressedBatchEntry extends + com.google.protobuf.GeneratedMessageLite< + CompressedBatchEntry, CompressedBatchEntry.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.CompressedBatchEntry) + CompressedBatchEntryOrBuilder { + private CompressedBatchEntry() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.cosmos.ics23.v1.CompressedExistenceProof) proof_; + } + return com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.CompressedExistenceProof.newBuilder((com.cosmos.ics23.v1.CompressedExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedNonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.cosmos.ics23.v1.CompressedNonExistenceProof) proof_; + } + return com.cosmos.ics23.v1.CompressedNonExistenceProof.getDefaultInstance(); + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.cosmos.ics23.v1.CompressedNonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.cosmos.ics23.v1.CompressedNonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.cosmos.ics23.v1.CompressedNonExistenceProof.getDefaultInstance()) { + proof_ = com.cosmos.ics23.v1.CompressedNonExistenceProof.newBuilder((com.cosmos.ics23.v1.CompressedNonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.CompressedBatchEntry prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Use BatchEntry not CommitmentProof, to avoid recursion
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.CompressedBatchEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.CompressedBatchEntry, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.CompressedBatchEntry) + com.cosmos.ics23.v1.CompressedBatchEntryOrBuilder { + // Construct using com.cosmos.ics23.v1.CompressedBatchEntry.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getExist() { + return instance.getExist(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.cosmos.ics23.v1.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedNonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.cosmos.ics23.v1.CompressedNonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.cosmos.ics23.v1.CompressedNonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.cosmos.ics23.v1.CompressedNonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.CompressedBatchEntry) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.CompressedBatchEntry(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.cosmos.ics23.v1.CompressedExistenceProof.class, + com.cosmos.ics23.v1.CompressedNonExistenceProof.class, + }; + java.lang.String info = + "\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.CompressedBatchEntry.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.CompressedBatchEntry) + private static final com.cosmos.ics23.v1.CompressedBatchEntry DEFAULT_INSTANCE; + static { + CompressedBatchEntry defaultInstance = new CompressedBatchEntry(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedBatchEntry.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.CompressedBatchEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntryOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntryOrBuilder.java new file mode 100644 index 000000000..93a92cd25 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchEntryOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface CompressedBatchEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.CompressedBatchEntry) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .cosmos.ics23.v1.CompressedExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.cosmos.ics23.v1.CompressedExistenceProof getExist(); + + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .cosmos.ics23.v1.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.cosmos.ics23.v1.CompressedNonExistenceProof getNonexist(); + + public com.cosmos.ics23.v1.CompressedBatchEntry.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProof.java new file mode 100644 index 000000000..5453c04ea --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProof.java @@ -0,0 +1,582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + * Protobuf type {@code cosmos.ics23.v1.CompressedBatchProof} + */ +public final class CompressedBatchProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedBatchProof, CompressedBatchProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.CompressedBatchProof) + CompressedBatchProofOrBuilder { + private CompressedBatchProof() { + entries_ = emptyProtobufList(); + lookupInners_ = emptyProtobufList(); + } + public static final int ENTRIES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList entries_; + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedBatchEntry getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public com.cosmos.ics23.v1.CompressedBatchEntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + private void ensureEntriesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = entries_; + if (!tmp.isModifiable()) { + entries_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void setEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.set(index, value); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries(com.cosmos.ics23.v1.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(value); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(index, value); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addAllEntries( + java.lang.Iterable values) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, entries_); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void clearEntries() { + entries_ = emptyProtobufList(); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void removeEntries(int index) { + ensureEntriesIsMutable(); + entries_.remove(index); + } + + public static final int LOOKUP_INNERS_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList lookupInners_; + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public java.util.List getLookupInnersList() { + return lookupInners_; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public java.util.List + getLookupInnersOrBuilderList() { + return lookupInners_; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public int getLookupInnersCount() { + return lookupInners_.size(); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerOp getLookupInners(int index) { + return lookupInners_.get(index); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public com.cosmos.ics23.v1.InnerOpOrBuilder getLookupInnersOrBuilder( + int index) { + return lookupInners_.get(index); + } + private void ensureLookupInnersIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = lookupInners_; + if (!tmp.isModifiable()) { + lookupInners_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void setLookupInners( + int index, com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.set(index, value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addLookupInners(com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.add(value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addLookupInners( + int index, com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.add(index, value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addAllLookupInners( + java.lang.Iterable values) { + ensureLookupInnersIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, lookupInners_); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void clearLookupInners() { + lookupInners_ = emptyProtobufList(); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void removeLookupInners(int index) { + ensureLookupInnersIsMutable(); + lookupInners_.remove(index); + } + + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedBatchProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.CompressedBatchProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code cosmos.ics23.v1.CompressedBatchProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.CompressedBatchProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.CompressedBatchProof) + com.cosmos.ics23.v1.CompressedBatchProofOrBuilder { + // Construct using com.cosmos.ics23.v1.CompressedBatchProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return java.util.Collections.unmodifiableList( + instance.getEntriesList()); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return instance.getEntriesCount(); + }/** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedBatchEntry getEntries(int index) { + return instance.getEntries(index); + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry value) { + copyOnWrite(); + instance.setEntries(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.setEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries(com.cosmos.ics23.v1.CompressedBatchEntry value) { + copyOnWrite(); + instance.addEntries(value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry value) { + copyOnWrite(); + instance.addEntries(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + com.cosmos.ics23.v1.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.cosmos.ics23.v1.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllEntries(values); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder clearEntries() { + copyOnWrite(); + instance.clearEntries(); + return this; + } + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder removeEntries(int index) { + copyOnWrite(); + instance.removeEntries(index); + return this; + } + + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public java.util.List getLookupInnersList() { + return java.util.Collections.unmodifiableList( + instance.getLookupInnersList()); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public int getLookupInnersCount() { + return instance.getLookupInnersCount(); + }/** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerOp getLookupInners(int index) { + return instance.getLookupInners(index); + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder setLookupInners( + int index, com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.setLookupInners(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder setLookupInners( + int index, com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.setLookupInners(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners(com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.addLookupInners(value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + int index, com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.addLookupInners(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addLookupInners(builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + int index, com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addLookupInners(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addAllLookupInners( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllLookupInners(values); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder clearLookupInners() { + copyOnWrite(); + instance.clearLookupInners(); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder removeLookupInners(int index) { + copyOnWrite(); + instance.removeLookupInners(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.CompressedBatchProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.CompressedBatchProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "entries_", + com.cosmos.ics23.v1.CompressedBatchEntry.class, + "lookupInners_", + com.cosmos.ics23.v1.InnerOp.class, + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0002\u0000\u0001\u001b\u0002\u001b" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.CompressedBatchProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.CompressedBatchProof) + private static final com.cosmos.ics23.v1.CompressedBatchProof DEFAULT_INSTANCE; + static { + CompressedBatchProof defaultInstance = new CompressedBatchProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedBatchProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.CompressedBatchProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProofOrBuilder.java new file mode 100644 index 000000000..b886201c9 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedBatchProofOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface CompressedBatchProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.CompressedBatchProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + java.util.List + getEntriesList(); + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + com.cosmos.ics23.v1.CompressedBatchEntry getEntries(int index); + /** + * repeated .cosmos.ics23.v1.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + int getEntriesCount(); + + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + java.util.List + getLookupInnersList(); + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + com.cosmos.ics23.v1.InnerOp getLookupInners(int index); + /** + * repeated .cosmos.ics23.v1.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + int getLookupInnersCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProof.java new file mode 100644 index 000000000..fd66a79f9 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProof.java @@ -0,0 +1,590 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + * Protobuf type {@code cosmos.ics23.v1.CompressedExistenceProof} + */ +public final class CompressedExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedExistenceProof, CompressedExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.CompressedExistenceProof) + CompressedExistenceProofOrBuilder { + private CompressedExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + value_ = com.google.protobuf.ByteString.EMPTY; + path_ = emptyIntList(); + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + */ + private void setValue(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + value_ = value; + } + /** + * bytes value = 2 [json_name = "value"]; + */ + private void clearValue() { + + value_ = getDefaultInstance().getValue(); + } + + public static final int LEAF_FIELD_NUMBER = 3; + private com.cosmos.ics23.v1.LeafOp leaf_; + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return leaf_ != null; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeaf() { + return leaf_ == null ? com.cosmos.ics23.v1.LeafOp.getDefaultInstance() : leaf_; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void setLeaf(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + leaf_ = value; + + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeaf(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + if (leaf_ != null && + leaf_ != com.cosmos.ics23.v1.LeafOp.getDefaultInstance()) { + leaf_ = + com.cosmos.ics23.v1.LeafOp.newBuilder(leaf_).mergeFrom(value).buildPartial(); + } else { + leaf_ = value; + } + + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void clearLeaf() { leaf_ = null; + + } + + public static final int PATH_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList path_; + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + @java.lang.Override + public java.util.List + getPathList() { + return path_; + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + @java.lang.Override + public int getPath(int index) { + return path_.getInt(index); + } + private int pathMemoizedSerializedSize = -1; + private void ensurePathIsMutable() { + com.google.protobuf.Internal.IntList tmp = path_; + if (!tmp.isModifiable()) { + path_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index to set the value at. + * @param value The path to set. + */ + private void setPath( + int index, int value) { + ensurePathIsMutable(); + path_.setInt(index, value); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to add. + */ + private void addPath(int value) { + ensurePathIsMutable(); + path_.addInt(value); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param values The path to add. + */ + private void addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, path_); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + */ + private void clearPath() { + path_ = emptyIntList(); + } + + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.CompressedExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code cosmos.ics23.v1.CompressedExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.CompressedExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.CompressedExistenceProof) + com.cosmos.ics23.v1.CompressedExistenceProofOrBuilder { + // Construct using com.cosmos.ics23.v1.CompressedExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return instance.getValue(); + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValue(value); + return this; + } + /** + * bytes value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + copyOnWrite(); + instance.clearValue(); + return this; + } + + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return instance.hasLeaf(); + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeaf() { + return instance.getLeaf(); + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.setLeaf(value); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf( + com.cosmos.ics23.v1.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeaf(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder mergeLeaf(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.mergeLeaf(value); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder clearLeaf() { copyOnWrite(); + instance.clearLeaf(); + return this; + } + + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + @java.lang.Override + public java.util.List + getPathList() { + return java.util.Collections.unmodifiableList( + instance.getPathList()); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + @java.lang.Override + public int getPathCount() { + return instance.getPathCount(); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + @java.lang.Override + public int getPath(int index) { + return instance.getPath(index); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + int index, int value) { + copyOnWrite(); + instance.setPath(index, value); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to add. + * @return This builder for chaining. + */ + public Builder addPath(int value) { + copyOnWrite(); + instance.addPath(value); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param values The path to add. + * @return This builder for chaining. + */ + public Builder addAllPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllPath(values); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return This builder for chaining. + */ + public Builder clearPath() { + copyOnWrite(); + instance.clearPath(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.CompressedExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.CompressedExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "value_", + "leaf_", + "path_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\n\u0002\n\u0003" + + "\t\u0004\'"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.CompressedExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.CompressedExistenceProof) + private static final com.cosmos.ics23.v1.CompressedExistenceProof DEFAULT_INSTANCE; + static { + CompressedExistenceProof defaultInstance = new CompressedExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedExistenceProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.CompressedExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProofOrBuilder.java new file mode 100644 index 000000000..b7b4c73ab --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedExistenceProofOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface CompressedExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.CompressedExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + boolean hasLeaf(); + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + * @return The leaf. + */ + com.cosmos.ics23.v1.LeafOp getLeaf(); + + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + java.util.List getPathList(); + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + int getPathCount(); + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + int getPath(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProof.java new file mode 100644 index 000000000..de88b6a19 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProof.java @@ -0,0 +1,453 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + * Protobuf type {@code cosmos.ics23.v1.CompressedNonExistenceProof} + */ +public final class CompressedNonExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedNonExistenceProof, CompressedNonExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.CompressedNonExistenceProof) + CompressedNonExistenceProofOrBuilder { + private CompressedNonExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int LEFT_FIELD_NUMBER = 2; + private com.cosmos.ics23.v1.CompressedExistenceProof left_; + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return left_ != null; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getLeft() { + return left_ == null ? com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance() : left_; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + private void setLeft(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + left_ = value; + + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeft(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + if (left_ != null && + left_ != com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance()) { + left_ = + com.cosmos.ics23.v1.CompressedExistenceProof.newBuilder(left_).mergeFrom(value).buildPartial(); + } else { + left_ = value; + } + + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + private void clearLeft() { left_ = null; + + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private com.cosmos.ics23.v1.CompressedExistenceProof right_; + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return right_ != null; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getRight() { + return right_ == null ? com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance() : right_; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + private void setRight(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + right_ = value; + + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeRight(com.cosmos.ics23.v1.CompressedExistenceProof value) { + value.getClass(); + if (right_ != null && + right_ != com.cosmos.ics23.v1.CompressedExistenceProof.getDefaultInstance()) { + right_ = + com.cosmos.ics23.v1.CompressedExistenceProof.newBuilder(right_).mergeFrom(value).buildPartial(); + } else { + right_ = value; + } + + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + private void clearRight() { right_ = null; + + } + + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.CompressedNonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.CompressedNonExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code cosmos.ics23.v1.CompressedNonExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.CompressedNonExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.CompressedNonExistenceProof) + com.cosmos.ics23.v1.CompressedNonExistenceProofOrBuilder { + // Construct using com.cosmos.ics23.v1.CompressedNonExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return instance.hasLeft(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getLeft() { + return instance.getLeft(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.setLeft(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft( + com.cosmos.ics23.v1.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setLeft(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder mergeLeft(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeLeft(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder clearLeft() { copyOnWrite(); + instance.clearLeft(); + return this; + } + + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return instance.hasRight(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CompressedExistenceProof getRight() { + return instance.getRight(); + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.setRight(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight( + com.cosmos.ics23.v1.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setRight(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder mergeRight(com.cosmos.ics23.v1.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeRight(value); + return this; + } + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder clearRight() { copyOnWrite(); + instance.clearRight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.CompressedNonExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.CompressedNonExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "left_", + "right_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + + "\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.CompressedNonExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.CompressedNonExistenceProof) + private static final com.cosmos.ics23.v1.CompressedNonExistenceProof DEFAULT_INSTANCE; + static { + CompressedNonExistenceProof defaultInstance = new CompressedNonExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedNonExistenceProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.CompressedNonExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProofOrBuilder.java new file mode 100644 index 000000000..4a45c39f2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/CompressedNonExistenceProofOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface CompressedNonExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.CompressedNonExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + * @return Whether the left field is set. + */ + boolean hasLeft(); + /** + * .cosmos.ics23.v1.CompressedExistenceProof left = 2 [json_name = "left"]; + * @return The left. + */ + com.cosmos.ics23.v1.CompressedExistenceProof getLeft(); + + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + * @return Whether the right field is set. + */ + boolean hasRight(); + /** + * .cosmos.ics23.v1.CompressedExistenceProof right = 3 [json_name = "right"]; + * @return The right. + */ + com.cosmos.ics23.v1.CompressedExistenceProof getRight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProof.java new file mode 100644 index 000000000..7d5757298 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProof.java @@ -0,0 +1,631 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ **
+ *ExistenceProof takes a key and a value and a set of steps to perform on it.
+ *The result of peforming all these steps will provide a "root hash", which can
+ *be compared to the value in a header.
+ *Since it is computationally infeasible to produce a hash collission for any of the used
+ *cryptographic hash functions, if someone can provide a series of operations to transform
+ *a given key and value into a root hash that matches some trusted root, these key and values
+ *must be in the referenced merkle tree.
+ *The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
+ *which should be controlled by a spec. Eg. with lengthOp as NONE,
+ *prefix = FOO, key = BAR, value = CHOICE
+ *and
+ *prefix = F, key = OOBAR, value = CHOICE
+ *would produce the same value.
+ *With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
+ *in the ProofSpec is valuable to prevent this mutability. And why all trees should
+ *length-prefix the data before hashing it.
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.ExistenceProof} + */ +public final class ExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + ExistenceProof, ExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.ExistenceProof) + ExistenceProofOrBuilder { + private ExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + value_ = com.google.protobuf.ByteString.EMPTY; + path_ = emptyProtobufList(); + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + */ + private void setValue(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + value_ = value; + } + /** + * bytes value = 2 [json_name = "value"]; + */ + private void clearValue() { + + value_ = getDefaultInstance().getValue(); + } + + public static final int LEAF_FIELD_NUMBER = 3; + private com.cosmos.ics23.v1.LeafOp leaf_; + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return leaf_ != null; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeaf() { + return leaf_ == null ? com.cosmos.ics23.v1.LeafOp.getDefaultInstance() : leaf_; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void setLeaf(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + leaf_ = value; + + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeaf(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + if (leaf_ != null && + leaf_ != com.cosmos.ics23.v1.LeafOp.getDefaultInstance()) { + leaf_ = + com.cosmos.ics23.v1.LeafOp.newBuilder(leaf_).mergeFrom(value).buildPartial(); + } else { + leaf_ = value; + } + + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void clearLeaf() { leaf_ = null; + + } + + public static final int PATH_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList path_; + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public java.util.List getPathList() { + return path_; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public java.util.List + getPathOrBuilderList() { + return path_; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerOp getPath(int index) { + return path_.get(index); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public com.cosmos.ics23.v1.InnerOpOrBuilder getPathOrBuilder( + int index) { + return path_.get(index); + } + private void ensurePathIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = path_; + if (!tmp.isModifiable()) { + path_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void setPath( + int index, com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.set(index, value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void addPath(com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.add(value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void addPath( + int index, com.cosmos.ics23.v1.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.add(index, value); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, path_); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void clearPath() { + path_ = emptyProtobufList(); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + private void removePath(int index) { + ensurePathIsMutable(); + path_.remove(index); + } + + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.ExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.ExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *ExistenceProof takes a key and a value and a set of steps to perform on it.
+   *The result of peforming all these steps will provide a "root hash", which can
+   *be compared to the value in a header.
+   *Since it is computationally infeasible to produce a hash collission for any of the used
+   *cryptographic hash functions, if someone can provide a series of operations to transform
+   *a given key and value into a root hash that matches some trusted root, these key and values
+   *must be in the referenced merkle tree.
+   *The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
+   *which should be controlled by a spec. Eg. with lengthOp as NONE,
+   *prefix = FOO, key = BAR, value = CHOICE
+   *and
+   *prefix = F, key = OOBAR, value = CHOICE
+   *would produce the same value.
+   *With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
+   *in the ProofSpec is valuable to prevent this mutability. And why all trees should
+   *length-prefix the data before hashing it.
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.ExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.ExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.ExistenceProof) + com.cosmos.ics23.v1.ExistenceProofOrBuilder { + // Construct using com.cosmos.ics23.v1.ExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return instance.getValue(); + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValue(value); + return this; + } + /** + * bytes value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + copyOnWrite(); + instance.clearValue(); + return this; + } + + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return instance.hasLeaf(); + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeaf() { + return instance.getLeaf(); + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.setLeaf(value); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf( + com.cosmos.ics23.v1.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeaf(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder mergeLeaf(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.mergeLeaf(value); + return this; + } + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder clearLeaf() { copyOnWrite(); + instance.clearLeaf(); + return this; + } + + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public java.util.List getPathList() { + return java.util.Collections.unmodifiableList( + instance.getPathList()); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public int getPathCount() { + return instance.getPathCount(); + }/** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerOp getPath(int index) { + return instance.getPath(index); + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder setPath( + int index, com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.setPath(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder setPath( + int index, com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.setPath(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath(com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.addPath(value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + int index, com.cosmos.ics23.v1.InnerOp value) { + copyOnWrite(); + instance.addPath(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addPath(builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + int index, com.cosmos.ics23.v1.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addPath(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addAllPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllPath(values); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder clearPath() { + copyOnWrite(); + instance.clearPath(); + return this; + } + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + public Builder removePath(int index) { + copyOnWrite(); + instance.removePath(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.ExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.ExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "value_", + "leaf_", + "path_", + com.cosmos.ics23.v1.InnerOp.class, + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\n\u0002\n\u0003" + + "\t\u0004\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.ExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.ExistenceProof) + private static final com.cosmos.ics23.v1.ExistenceProof DEFAULT_INSTANCE; + static { + ExistenceProof defaultInstance = new ExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ExistenceProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.ExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProofOrBuilder.java new file mode 100644 index 000000000..d48b99067 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ExistenceProofOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface ExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.ExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + boolean hasLeaf(); + /** + * .cosmos.ics23.v1.LeafOp leaf = 3 [json_name = "leaf"]; + * @return The leaf. + */ + com.cosmos.ics23.v1.LeafOp getLeaf(); + + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + java.util.List + getPathList(); + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + com.cosmos.ics23.v1.InnerOp getPath(int index); + /** + * repeated .cosmos.ics23.v1.InnerOp path = 4 [json_name = "path"]; + */ + int getPathCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/HashOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/HashOp.java new file mode 100644 index 000000000..72126e068 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/HashOp.java @@ -0,0 +1,155 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + * Protobuf enum {@code cosmos.ics23.v1.HashOp} + */ +public enum HashOp + implements com.google.protobuf.Internal.EnumLite { + /** + *
+   * NO_HASH is the default if no data passed. Note this is an illegal argument some places.
+   * 
+ * + * NO_HASH = 0; + */ + NO_HASH(0), + /** + * SHA256 = 1; + */ + SHA256(1), + /** + * SHA512 = 2; + */ + SHA512(2), + /** + * KECCAK = 3; + */ + KECCAK(3), + /** + * RIPEMD160 = 4; + */ + RIPEMD160(4), + /** + *
+   * ripemd160(sha256(x))
+   * 
+ * + * BITCOIN = 5; + */ + BITCOIN(5), + /** + * SHA512_256 = 6; + */ + SHA512_256(6), + UNRECOGNIZED(-1), + ; + + /** + *
+   * NO_HASH is the default if no data passed. Note this is an illegal argument some places.
+   * 
+ * + * NO_HASH = 0; + */ + public static final int NO_HASH_VALUE = 0; + /** + * SHA256 = 1; + */ + public static final int SHA256_VALUE = 1; + /** + * SHA512 = 2; + */ + public static final int SHA512_VALUE = 2; + /** + * KECCAK = 3; + */ + public static final int KECCAK_VALUE = 3; + /** + * RIPEMD160 = 4; + */ + public static final int RIPEMD160_VALUE = 4; + /** + *
+   * ripemd160(sha256(x))
+   * 
+ * + * BITCOIN = 5; + */ + public static final int BITCOIN_VALUE = 5; + /** + * SHA512_256 = 6; + */ + public static final int SHA512_256_VALUE = 6; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HashOp valueOf(int value) { + return forNumber(value); + } + + public static HashOp forNumber(int value) { + switch (value) { + case 0: return NO_HASH; + case 1: return SHA256; + case 2: return SHA512; + case 3: return KECCAK; + case 4: return RIPEMD160; + case 5: return BITCOIN; + case 6: return SHA512_256; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HashOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public HashOp findValueByNumber(int number) { + return HashOp.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return HashOpVerifier.INSTANCE; + } + + private static final class HashOpVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new HashOpVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return HashOp.forNumber(number) != null; + } + }; + + private final int value; + + private HashOp(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cosmos.ics23.v1.HashOp) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOp.java new file mode 100644 index 000000000..b0222ce7c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOp.java @@ -0,0 +1,417 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ **
+ *InnerOp represents a merkle-proof step that is not a leaf.
+ *It represents concatenating two children and hashing them to provide the next result.
+ *The result of the previous step is passed in, so the signature of this op is:
+ *innerOp(child) -> output
+ *The result of applying InnerOp should be:
+ *output = op.hash(op.prefix || child || op.suffix)
+ *where the || operator is concatenation of binary data,
+ *and child is the result of hashing all the tree below this step.
+ *Any special data, like prepending child with the length, or prepending the entire operation with
+ *some value to differentiate from leaf nodes, should be included in prefix and suffix.
+ *If either of prefix or suffix is empty, we just treat it as an empty string
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.InnerOp} + */ +public final class InnerOp extends + com.google.protobuf.GeneratedMessageLite< + InnerOp, InnerOp.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.InnerOp) + InnerOpOrBuilder { + private InnerOp() { + prefix_ = com.google.protobuf.ByteString.EMPTY; + suffix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private int hash_; + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + com.cosmos.ics23.v1.HashOp result = com.cosmos.ics23.v1.HashOp.forNumber(hash_); + return result == null ? com.cosmos.ics23.v1.HashOp.UNRECOGNIZED : result; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.cosmos.ics23.v1.HashOp value) { + hash_ = value.getNumber(); + + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static final int PREFIX_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString prefix_; + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return prefix_; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @param value The prefix to set. + */ + private void setPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + prefix_ = value; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + */ + private void clearPrefix() { + + prefix_ = getDefaultInstance().getPrefix(); + } + + public static final int SUFFIX_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString suffix_; + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuffix() { + return suffix_; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @param value The suffix to set. + */ + private void setSuffix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + suffix_ = value; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + */ + private void clearSuffix() { + + suffix_ = getDefaultInstance().getSuffix(); + } + + public static com.cosmos.ics23.v1.InnerOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.InnerOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *InnerOp represents a merkle-proof step that is not a leaf.
+   *It represents concatenating two children and hashing them to provide the next result.
+   *The result of the previous step is passed in, so the signature of this op is:
+   *innerOp(child) -> output
+   *The result of applying InnerOp should be:
+   *output = op.hash(op.prefix || child || op.suffix)
+   *where the || operator is concatenation of binary data,
+   *and child is the result of hashing all the tree below this step.
+   *Any special data, like prepending child with the length, or prepending the entire operation with
+   *some value to differentiate from leaf nodes, should be included in prefix and suffix.
+   *If either of prefix or suffix is empty, we just treat it as an empty string
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.InnerOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.InnerOp, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.InnerOp) + com.cosmos.ics23.v1.InnerOpOrBuilder { + // Construct using com.cosmos.ics23.v1.InnerOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + return instance.getHash(); + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.cosmos.ics23.v1.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return instance.getPrefix(); + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @param value The prefix to set. + * @return This builder for chaining. + */ + public Builder setPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPrefix(value); + return this; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return This builder for chaining. + */ + public Builder clearPrefix() { + copyOnWrite(); + instance.clearPrefix(); + return this; + } + + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuffix() { + return instance.getSuffix(); + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @param value The suffix to set. + * @return This builder for chaining. + */ + public Builder setSuffix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSuffix(value); + return this; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return This builder for chaining. + */ + public Builder clearSuffix() { + copyOnWrite(); + instance.clearSuffix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.InnerOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.InnerOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + "prefix_", + "suffix_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\f\u0002\n\u0003" + + "\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.InnerOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.InnerOp) + private static final com.cosmos.ics23.v1.InnerOp DEFAULT_INSTANCE; + static { + InnerOp defaultInstance = new InnerOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + InnerOp.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.InnerOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOpOrBuilder.java new file mode 100644 index 000000000..359b38420 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerOpOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface InnerOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.InnerOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.cosmos.ics23.v1.HashOp getHash(); + + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + com.google.protobuf.ByteString getPrefix(); + + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + com.google.protobuf.ByteString getSuffix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpec.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpec.java new file mode 100644 index 000000000..426b028b1 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpec.java @@ -0,0 +1,803 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ *InnerSpec contains all store-specific structure info to determine if two proofs from a
+ *given store are neighbors.
+ *This enables:
+ *isLeftMost(spec: InnerSpec, op: InnerOp)
+ *isRightMost(spec: InnerSpec, op: InnerOp)
+ *isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.InnerSpec} + */ +public final class InnerSpec extends + com.google.protobuf.GeneratedMessageLite< + InnerSpec, InnerSpec.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.InnerSpec) + InnerSpecOrBuilder { + private InnerSpec() { + childOrder_ = emptyIntList(); + emptyChild_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int CHILD_ORDER_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList childOrder_; + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + @java.lang.Override + public java.util.List + getChildOrderList() { + return childOrder_; + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + @java.lang.Override + public int getChildOrderCount() { + return childOrder_.size(); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + @java.lang.Override + public int getChildOrder(int index) { + return childOrder_.getInt(index); + } + private int childOrderMemoizedSerializedSize = -1; + private void ensureChildOrderIsMutable() { + com.google.protobuf.Internal.IntList tmp = childOrder_; + if (!tmp.isModifiable()) { + childOrder_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index to set the value at. + * @param value The childOrder to set. + */ + private void setChildOrder( + int index, int value) { + ensureChildOrderIsMutable(); + childOrder_.setInt(index, value); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to add. + */ + private void addChildOrder(int value) { + ensureChildOrderIsMutable(); + childOrder_.addInt(value); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param values The childOrder to add. + */ + private void addAllChildOrder( + java.lang.Iterable values) { + ensureChildOrderIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, childOrder_); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + */ + private void clearChildOrder() { + childOrder_ = emptyIntList(); + } + + public static final int CHILD_SIZE_FIELD_NUMBER = 2; + private int childSize_; + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + @java.lang.Override + public int getChildSize() { + return childSize_; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @param value The childSize to set. + */ + private void setChildSize(int value) { + + childSize_ = value; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + */ + private void clearChildSize() { + + childSize_ = 0; + } + + public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER = 3; + private int minPrefixLength_; + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + @java.lang.Override + public int getMinPrefixLength() { + return minPrefixLength_; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @param value The minPrefixLength to set. + */ + private void setMinPrefixLength(int value) { + + minPrefixLength_ = value; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + */ + private void clearMinPrefixLength() { + + minPrefixLength_ = 0; + } + + public static final int MAX_PREFIX_LENGTH_FIELD_NUMBER = 4; + private int maxPrefixLength_; + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + @java.lang.Override + public int getMaxPrefixLength() { + return maxPrefixLength_; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @param value The maxPrefixLength to set. + */ + private void setMaxPrefixLength(int value) { + + maxPrefixLength_ = value; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + */ + private void clearMaxPrefixLength() { + + maxPrefixLength_ = 0; + } + + public static final int EMPTY_CHILD_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString emptyChild_; + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmptyChild() { + return emptyChild_; + } + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @param value The emptyChild to set. + */ + private void setEmptyChild(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + emptyChild_ = value; + } + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + */ + private void clearEmptyChild() { + + emptyChild_ = getDefaultInstance().getEmptyChild(); + } + + public static final int HASH_FIELD_NUMBER = 6; + private int hash_; + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + com.cosmos.ics23.v1.HashOp result = com.cosmos.ics23.v1.HashOp.forNumber(hash_); + return result == null ? com.cosmos.ics23.v1.HashOp.UNRECOGNIZED : result; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.cosmos.ics23.v1.HashOp value) { + hash_ = value.getNumber(); + + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.InnerSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.InnerSpec prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *InnerSpec contains all store-specific structure info to determine if two proofs from a
+   *given store are neighbors.
+   *This enables:
+   *isLeftMost(spec: InnerSpec, op: InnerOp)
+   *isRightMost(spec: InnerSpec, op: InnerOp)
+   *isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.InnerSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.InnerSpec, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.InnerSpec) + com.cosmos.ics23.v1.InnerSpecOrBuilder { + // Construct using com.cosmos.ics23.v1.InnerSpec.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + @java.lang.Override + public java.util.List + getChildOrderList() { + return java.util.Collections.unmodifiableList( + instance.getChildOrderList()); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + @java.lang.Override + public int getChildOrderCount() { + return instance.getChildOrderCount(); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + @java.lang.Override + public int getChildOrder(int index) { + return instance.getChildOrder(index); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to set. + * @return This builder for chaining. + */ + public Builder setChildOrder( + int index, int value) { + copyOnWrite(); + instance.setChildOrder(index, value); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to add. + * @return This builder for chaining. + */ + public Builder addChildOrder(int value) { + copyOnWrite(); + instance.addChildOrder(value); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param values The childOrder to add. + * @return This builder for chaining. + */ + public Builder addAllChildOrder( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllChildOrder(values); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return This builder for chaining. + */ + public Builder clearChildOrder() { + copyOnWrite(); + instance.clearChildOrder(); + return this; + } + + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + @java.lang.Override + public int getChildSize() { + return instance.getChildSize(); + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @param value The childSize to set. + * @return This builder for chaining. + */ + public Builder setChildSize(int value) { + copyOnWrite(); + instance.setChildSize(value); + return this; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return This builder for chaining. + */ + public Builder clearChildSize() { + copyOnWrite(); + instance.clearChildSize(); + return this; + } + + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + @java.lang.Override + public int getMinPrefixLength() { + return instance.getMinPrefixLength(); + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @param value The minPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setMinPrefixLength(int value) { + copyOnWrite(); + instance.setMinPrefixLength(value); + return this; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return This builder for chaining. + */ + public Builder clearMinPrefixLength() { + copyOnWrite(); + instance.clearMinPrefixLength(); + return this; + } + + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + @java.lang.Override + public int getMaxPrefixLength() { + return instance.getMaxPrefixLength(); + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @param value The maxPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setMaxPrefixLength(int value) { + copyOnWrite(); + instance.setMaxPrefixLength(value); + return this; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return This builder for chaining. + */ + public Builder clearMaxPrefixLength() { + copyOnWrite(); + instance.clearMaxPrefixLength(); + return this; + } + + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmptyChild() { + return instance.getEmptyChild(); + } + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @param value The emptyChild to set. + * @return This builder for chaining. + */ + public Builder setEmptyChild(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setEmptyChild(value); + return this; + } + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return This builder for chaining. + */ + public Builder clearEmptyChild() { + copyOnWrite(); + instance.clearEmptyChild(); + return this; + } + + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + return instance.getHash(); + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.cosmos.ics23.v1.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.InnerSpec) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.InnerSpec(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "childOrder_", + "childSize_", + "minPrefixLength_", + "maxPrefixLength_", + "emptyChild_", + "hash_", + }; + java.lang.String info = + "\u0000\u0006\u0000\u0000\u0001\u0006\u0006\u0000\u0001\u0000\u0001\'\u0002\u0004" + + "\u0003\u0004\u0004\u0004\u0005\n\u0006\f"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.InnerSpec.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.InnerSpec) + private static final com.cosmos.ics23.v1.InnerSpec DEFAULT_INSTANCE; + static { + InnerSpec defaultInstance = new InnerSpec(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + InnerSpec.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.InnerSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpecOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpecOrBuilder.java new file mode 100644 index 000000000..47330a54d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/InnerSpecOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface InnerSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.InnerSpec) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + java.util.List getChildOrderList(); + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + int getChildOrderCount(); + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + int getChildOrder(int index); + + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + int getChildSize(); + + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + int getMinPrefixLength(); + + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + int getMaxPrefixLength(); + + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + com.google.protobuf.ByteString getEmptyChild(); + + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .cosmos.ics23.v1.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + com.cosmos.ics23.v1.HashOp getHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOp.java new file mode 100644 index 000000000..56e83a596 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOp.java @@ -0,0 +1,657 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ **
+ *LeafOp represents the raw key-value data we wish to prove, and
+ *must be flexible to represent the internal transformation from
+ *the original key-value pairs into the basis hash, for many existing
+ *merkle trees.
+ *key and value are passed in. So that the signature of this operation is:
+ *leafOp(key, value) -> output
+ *To process this, first prehash the keys and values if needed (ANY means no hash in this case):
+ *hkey = prehashKey(key)
+ *hvalue = prehashValue(value)
+ *Then combine the bytes, and hash it
+ *output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.LeafOp} + */ +public final class LeafOp extends + com.google.protobuf.GeneratedMessageLite< + LeafOp, LeafOp.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.LeafOp) + LeafOpOrBuilder { + private LeafOp() { + prefix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private int hash_; + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + com.cosmos.ics23.v1.HashOp result = com.cosmos.ics23.v1.HashOp.forNumber(hash_); + return result == null ? com.cosmos.ics23.v1.HashOp.UNRECOGNIZED : result; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.cosmos.ics23.v1.HashOp value) { + hash_ = value.getNumber(); + + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static final int PREHASH_KEY_FIELD_NUMBER = 2; + private int prehashKey_; + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + @java.lang.Override + public int getPrehashKeyValue() { + return prehashKey_; + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getPrehashKey() { + com.cosmos.ics23.v1.HashOp result = com.cosmos.ics23.v1.HashOp.forNumber(prehashKey_); + return result == null ? com.cosmos.ics23.v1.HashOp.UNRECOGNIZED : result; + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The enum numeric value on the wire for prehashKey to set. + */ + private void setPrehashKeyValue(int value) { + prehashKey_ = value; + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The prehashKey to set. + */ + private void setPrehashKey(com.cosmos.ics23.v1.HashOp value) { + prehashKey_ = value.getNumber(); + + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + */ + private void clearPrehashKey() { + + prehashKey_ = 0; + } + + public static final int PREHASH_VALUE_FIELD_NUMBER = 3; + private int prehashValue_; + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + @java.lang.Override + public int getPrehashValueValue() { + return prehashValue_; + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getPrehashValue() { + com.cosmos.ics23.v1.HashOp result = com.cosmos.ics23.v1.HashOp.forNumber(prehashValue_); + return result == null ? com.cosmos.ics23.v1.HashOp.UNRECOGNIZED : result; + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The enum numeric value on the wire for prehashValue to set. + */ + private void setPrehashValueValue(int value) { + prehashValue_ = value; + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The prehashValue to set. + */ + private void setPrehashValue(com.cosmos.ics23.v1.HashOp value) { + prehashValue_ = value.getNumber(); + + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + */ + private void clearPrehashValue() { + + prehashValue_ = 0; + } + + public static final int LENGTH_FIELD_NUMBER = 4; + private int length_; + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + @java.lang.Override + public int getLengthValue() { + return length_; + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + @java.lang.Override + public com.cosmos.ics23.v1.LengthOp getLength() { + com.cosmos.ics23.v1.LengthOp result = com.cosmos.ics23.v1.LengthOp.forNumber(length_); + return result == null ? com.cosmos.ics23.v1.LengthOp.UNRECOGNIZED : result; + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @param value The enum numeric value on the wire for length to set. + */ + private void setLengthValue(int value) { + length_ = value; + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @param value The length to set. + */ + private void setLength(com.cosmos.ics23.v1.LengthOp value) { + length_ = value.getNumber(); + + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + */ + private void clearLength() { + + length_ = 0; + } + + public static final int PREFIX_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString prefix_; + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return prefix_; + } + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @param value The prefix to set. + */ + private void setPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + prefix_ = value; + } + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + */ + private void clearPrefix() { + + prefix_ = getDefaultInstance().getPrefix(); + } + + public static com.cosmos.ics23.v1.LeafOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.LeafOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.LeafOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.LeafOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.LeafOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *LeafOp represents the raw key-value data we wish to prove, and
+   *must be flexible to represent the internal transformation from
+   *the original key-value pairs into the basis hash, for many existing
+   *merkle trees.
+   *key and value are passed in. So that the signature of this operation is:
+   *leafOp(key, value) -> output
+   *To process this, first prehash the keys and values if needed (ANY means no hash in this case):
+   *hkey = prehashKey(key)
+   *hvalue = prehashValue(value)
+   *Then combine the bytes, and hash it
+   *output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.LeafOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.LeafOp, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.LeafOp) + com.cosmos.ics23.v1.LeafOpOrBuilder { + // Construct using com.cosmos.ics23.v1.LeafOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getHash() { + return instance.getHash(); + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.cosmos.ics23.v1.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + @java.lang.Override + public int getPrehashKeyValue() { + return instance.getPrehashKeyValue(); + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The prehashKey to set. + * @return This builder for chaining. + */ + public Builder setPrehashKeyValue(int value) { + copyOnWrite(); + instance.setPrehashKeyValue(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getPrehashKey() { + return instance.getPrehashKey(); + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The enum numeric value on the wire for prehashKey to set. + * @return This builder for chaining. + */ + public Builder setPrehashKey(com.cosmos.ics23.v1.HashOp value) { + copyOnWrite(); + instance.setPrehashKey(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return This builder for chaining. + */ + public Builder clearPrehashKey() { + copyOnWrite(); + instance.clearPrehashKey(); + return this; + } + + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + @java.lang.Override + public int getPrehashValueValue() { + return instance.getPrehashValueValue(); + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The prehashValue to set. + * @return This builder for chaining. + */ + public Builder setPrehashValueValue(int value) { + copyOnWrite(); + instance.setPrehashValueValue(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + @java.lang.Override + public com.cosmos.ics23.v1.HashOp getPrehashValue() { + return instance.getPrehashValue(); + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The enum numeric value on the wire for prehashValue to set. + * @return This builder for chaining. + */ + public Builder setPrehashValue(com.cosmos.ics23.v1.HashOp value) { + copyOnWrite(); + instance.setPrehashValue(value); + return this; + } + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return This builder for chaining. + */ + public Builder clearPrehashValue() { + copyOnWrite(); + instance.clearPrehashValue(); + return this; + } + + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + @java.lang.Override + public int getLengthValue() { + return instance.getLengthValue(); + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLengthValue(int value) { + copyOnWrite(); + instance.setLengthValue(value); + return this; + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + @java.lang.Override + public com.cosmos.ics23.v1.LengthOp getLength() { + return instance.getLength(); + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @param value The enum numeric value on the wire for length to set. + * @return This builder for chaining. + */ + public Builder setLength(com.cosmos.ics23.v1.LengthOp value) { + copyOnWrite(); + instance.setLength(value); + return this; + } + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return This builder for chaining. + */ + public Builder clearLength() { + copyOnWrite(); + instance.clearLength(); + return this; + } + + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return instance.getPrefix(); + } + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @param value The prefix to set. + * @return This builder for chaining. + */ + public Builder setPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPrefix(value); + return this; + } + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return This builder for chaining. + */ + public Builder clearPrefix() { + copyOnWrite(); + instance.clearPrefix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.LeafOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.LeafOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + "prehashKey_", + "prehashValue_", + "length_", + "prefix_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\f\u0002\f\u0003" + + "\f\u0004\f\u0005\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.LeafOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.LeafOp) + private static final com.cosmos.ics23.v1.LeafOp DEFAULT_INSTANCE; + static { + LeafOp defaultInstance = new LeafOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + LeafOp.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.LeafOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOpOrBuilder.java new file mode 100644 index 000000000..280eb1cdc --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LeafOpOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface LeafOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.LeafOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + * .cosmos.ics23.v1.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.cosmos.ics23.v1.HashOp getHash(); + + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + int getPrehashKeyValue(); + /** + * .cosmos.ics23.v1.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + com.cosmos.ics23.v1.HashOp getPrehashKey(); + + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + int getPrehashValueValue(); + /** + * .cosmos.ics23.v1.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + com.cosmos.ics23.v1.HashOp getPrehashValue(); + + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + int getLengthValue(); + /** + * .cosmos.ics23.v1.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + com.cosmos.ics23.v1.LengthOp getLength(); + + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + com.google.protobuf.ByteString getPrefix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LengthOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LengthOp.java new file mode 100644 index 000000000..0ba745860 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/LengthOp.java @@ -0,0 +1,237 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ **
+ *LengthOp defines how to process the key and value of the LeafOp
+ *to include length information. After encoding the length with the given
+ *algorithm, the length will be prepended to the key and value bytes.
+ *(Each one with it's own encoded length)
+ * 
+ * + * Protobuf enum {@code cosmos.ics23.v1.LengthOp} + */ +public enum LengthOp + implements com.google.protobuf.Internal.EnumLite { + /** + *
+   * NO_PREFIX don't include any length info
+   * 
+ * + * NO_PREFIX = 0; + */ + NO_PREFIX(0), + /** + *
+   * VAR_PROTO uses protobuf (and go-amino) varint encoding of the length
+   * 
+ * + * VAR_PROTO = 1; + */ + VAR_PROTO(1), + /** + *
+   * VAR_RLP uses rlp int encoding of the length
+   * 
+ * + * VAR_RLP = 2; + */ + VAR_RLP(2), + /** + *
+   * FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_BIG = 3; + */ + FIXED32_BIG(3), + /** + *
+   * FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_LITTLE = 4; + */ + FIXED32_LITTLE(4), + /** + *
+   * FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_BIG = 5; + */ + FIXED64_BIG(5), + /** + *
+   * FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_LITTLE = 6; + */ + FIXED64_LITTLE(6), + /** + *
+   * REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output)
+   * 
+ * + * REQUIRE_32_BYTES = 7; + */ + REQUIRE_32_BYTES(7), + /** + *
+   * REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
+   * 
+ * + * REQUIRE_64_BYTES = 8; + */ + REQUIRE_64_BYTES(8), + UNRECOGNIZED(-1), + ; + + /** + *
+   * NO_PREFIX don't include any length info
+   * 
+ * + * NO_PREFIX = 0; + */ + public static final int NO_PREFIX_VALUE = 0; + /** + *
+   * VAR_PROTO uses protobuf (and go-amino) varint encoding of the length
+   * 
+ * + * VAR_PROTO = 1; + */ + public static final int VAR_PROTO_VALUE = 1; + /** + *
+   * VAR_RLP uses rlp int encoding of the length
+   * 
+ * + * VAR_RLP = 2; + */ + public static final int VAR_RLP_VALUE = 2; + /** + *
+   * FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_BIG = 3; + */ + public static final int FIXED32_BIG_VALUE = 3; + /** + *
+   * FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_LITTLE = 4; + */ + public static final int FIXED32_LITTLE_VALUE = 4; + /** + *
+   * FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_BIG = 5; + */ + public static final int FIXED64_BIG_VALUE = 5; + /** + *
+   * FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_LITTLE = 6; + */ + public static final int FIXED64_LITTLE_VALUE = 6; + /** + *
+   * REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output)
+   * 
+ * + * REQUIRE_32_BYTES = 7; + */ + public static final int REQUIRE_32_BYTES_VALUE = 7; + /** + *
+   * REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
+   * 
+ * + * REQUIRE_64_BYTES = 8; + */ + public static final int REQUIRE_64_BYTES_VALUE = 8; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LengthOp valueOf(int value) { + return forNumber(value); + } + + public static LengthOp forNumber(int value) { + switch (value) { + case 0: return NO_PREFIX; + case 1: return VAR_PROTO; + case 2: return VAR_RLP; + case 3: return FIXED32_BIG; + case 4: return FIXED32_LITTLE; + case 5: return FIXED64_BIG; + case 6: return FIXED64_LITTLE; + case 7: return REQUIRE_32_BYTES; + case 8: return REQUIRE_64_BYTES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LengthOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public LengthOp findValueByNumber(int number) { + return LengthOp.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return LengthOpVerifier.INSTANCE; + } + + private static final class LengthOpVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new LengthOpVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return LengthOp.forNumber(number) != null; + } + }; + + private final int value; + + private LengthOp(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cosmos.ics23.v1.LengthOp) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProof.java new file mode 100644 index 000000000..bcedc7ac5 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProof.java @@ -0,0 +1,465 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ *NonExistenceProof takes a proof of two neighbors, one left of the desired key,
+ *one right of the desired key. If both proofs are valid AND they are neighbors,
+ *then there is no valid proof for the given key.
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.NonExistenceProof} + */ +public final class NonExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + NonExistenceProof, NonExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.NonExistenceProof) + NonExistenceProofOrBuilder { + private NonExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int LEFT_FIELD_NUMBER = 2; + private com.cosmos.ics23.v1.ExistenceProof left_; + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return left_ != null; + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getLeft() { + return left_ == null ? com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance() : left_; + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + private void setLeft(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + left_ = value; + + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeft(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + if (left_ != null && + left_ != com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance()) { + left_ = + com.cosmos.ics23.v1.ExistenceProof.newBuilder(left_).mergeFrom(value).buildPartial(); + } else { + left_ = value; + } + + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + private void clearLeft() { left_ = null; + + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private com.cosmos.ics23.v1.ExistenceProof right_; + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return right_ != null; + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getRight() { + return right_ == null ? com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance() : right_; + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + private void setRight(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + right_ = value; + + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeRight(com.cosmos.ics23.v1.ExistenceProof value) { + value.getClass(); + if (right_ != null && + right_ != com.cosmos.ics23.v1.ExistenceProof.getDefaultInstance()) { + right_ = + com.cosmos.ics23.v1.ExistenceProof.newBuilder(right_).mergeFrom(value).buildPartial(); + } else { + right_ = value; + } + + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + private void clearRight() { right_ = null; + + } + + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.NonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.NonExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *NonExistenceProof takes a proof of two neighbors, one left of the desired key,
+   *one right of the desired key. If both proofs are valid AND they are neighbors,
+   *then there is no valid proof for the given key.
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.NonExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.NonExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.NonExistenceProof) + com.cosmos.ics23.v1.NonExistenceProofOrBuilder { + // Construct using com.cosmos.ics23.v1.NonExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return instance.hasLeft(); + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getLeft() { + return instance.getLeft(); + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.setLeft(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft( + com.cosmos.ics23.v1.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setLeft(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder mergeLeft(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.mergeLeft(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder clearLeft() { copyOnWrite(); + instance.clearLeft(); + return this; + } + + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return instance.hasRight(); + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ExistenceProof getRight() { + return instance.getRight(); + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.setRight(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight( + com.cosmos.ics23.v1.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setRight(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder mergeRight(com.cosmos.ics23.v1.ExistenceProof value) { + copyOnWrite(); + instance.mergeRight(value); + return this; + } + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder clearRight() { copyOnWrite(); + instance.clearRight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.NonExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.NonExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "left_", + "right_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + + "\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.NonExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.NonExistenceProof) + private static final com.cosmos.ics23.v1.NonExistenceProof DEFAULT_INSTANCE; + static { + NonExistenceProof defaultInstance = new NonExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + NonExistenceProof.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.NonExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProofOrBuilder.java new file mode 100644 index 000000000..e6c2eafb2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/NonExistenceProofOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface NonExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.NonExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + * @return Whether the left field is set. + */ + boolean hasLeft(); + /** + * .cosmos.ics23.v1.ExistenceProof left = 2 [json_name = "left"]; + * @return The left. + */ + com.cosmos.ics23.v1.ExistenceProof getLeft(); + + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + * @return Whether the right field is set. + */ + boolean hasRight(); + /** + * .cosmos.ics23.v1.ExistenceProof right = 3 [json_name = "right"]; + * @return The right. + */ + com.cosmos.ics23.v1.ExistenceProof getRight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpec.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpec.java new file mode 100644 index 000000000..ac8dd70cc --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpec.java @@ -0,0 +1,609 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +/** + *
+ **
+ *ProofSpec defines what the expected parameters are for a given proof type.
+ *This can be stored in the client and used to validate any incoming proofs.
+ *verify(ProofSpec, Proof) -> Proof | Error
+ *As demonstrated in tests, if we don't fix the algorithm used to calculate the
+ *LeafHash for a given tree, there are many possible key-value pairs that can
+ *generate a given hash (by interpretting the preimage differently).
+ *We need this for proper security, requires client knows a priori what
+ *tree format server uses. But not in code, rather a configuration object.
+ * 
+ * + * Protobuf type {@code cosmos.ics23.v1.ProofSpec} + */ +public final class ProofSpec extends + com.google.protobuf.GeneratedMessageLite< + ProofSpec, ProofSpec.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.ics23.v1.ProofSpec) + ProofSpecOrBuilder { + private ProofSpec() { + } + public static final int LEAF_SPEC_FIELD_NUMBER = 1; + private com.cosmos.ics23.v1.LeafOp leafSpec_; + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public boolean hasLeafSpec() { + return leafSpec_ != null; + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeafSpec() { + return leafSpec_ == null ? com.cosmos.ics23.v1.LeafOp.getDefaultInstance() : leafSpec_; + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + private void setLeafSpec(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + leafSpec_ = value; + + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeafSpec(com.cosmos.ics23.v1.LeafOp value) { + value.getClass(); + if (leafSpec_ != null && + leafSpec_ != com.cosmos.ics23.v1.LeafOp.getDefaultInstance()) { + leafSpec_ = + com.cosmos.ics23.v1.LeafOp.newBuilder(leafSpec_).mergeFrom(value).buildPartial(); + } else { + leafSpec_ = value; + } + + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + private void clearLeafSpec() { leafSpec_ = null; + + } + + public static final int INNER_SPEC_FIELD_NUMBER = 2; + private com.cosmos.ics23.v1.InnerSpec innerSpec_; + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public boolean hasInnerSpec() { + return innerSpec_ != null; + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerSpec getInnerSpec() { + return innerSpec_ == null ? com.cosmos.ics23.v1.InnerSpec.getDefaultInstance() : innerSpec_; + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + private void setInnerSpec(com.cosmos.ics23.v1.InnerSpec value) { + value.getClass(); + innerSpec_ = value; + + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeInnerSpec(com.cosmos.ics23.v1.InnerSpec value) { + value.getClass(); + if (innerSpec_ != null && + innerSpec_ != com.cosmos.ics23.v1.InnerSpec.getDefaultInstance()) { + innerSpec_ = + com.cosmos.ics23.v1.InnerSpec.newBuilder(innerSpec_).mergeFrom(value).buildPartial(); + } else { + innerSpec_ = value; + } + + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + private void clearInnerSpec() { innerSpec_ = null; + + } + + public static final int MAX_DEPTH_FIELD_NUMBER = 3; + private int maxDepth_; + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + @java.lang.Override + public int getMaxDepth() { + return maxDepth_; + } + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @param value The maxDepth to set. + */ + private void setMaxDepth(int value) { + + maxDepth_ = value; + } + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + */ + private void clearMaxDepth() { + + maxDepth_ = 0; + } + + public static final int MIN_DEPTH_FIELD_NUMBER = 4; + private int minDepth_; + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + @java.lang.Override + public int getMinDepth() { + return minDepth_; + } + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @param value The minDepth to set. + */ + private void setMinDepth(int value) { + + minDepth_ = value; + } + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + */ + private void clearMinDepth() { + + minDepth_ = 0; + } + + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.ProofSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ProofSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.ics23.v1.ProofSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.ics23.v1.ProofSpec prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *ProofSpec defines what the expected parameters are for a given proof type.
+   *This can be stored in the client and used to validate any incoming proofs.
+   *verify(ProofSpec, Proof) -> Proof | Error
+   *As demonstrated in tests, if we don't fix the algorithm used to calculate the
+   *LeafHash for a given tree, there are many possible key-value pairs that can
+   *generate a given hash (by interpretting the preimage differently).
+   *We need this for proper security, requires client knows a priori what
+   *tree format server uses. But not in code, rather a configuration object.
+   * 
+ * + * Protobuf type {@code cosmos.ics23.v1.ProofSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.ics23.v1.ProofSpec, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.ics23.v1.ProofSpec) + com.cosmos.ics23.v1.ProofSpecOrBuilder { + // Construct using com.cosmos.ics23.v1.ProofSpec.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public boolean hasLeafSpec() { + return instance.hasLeafSpec(); + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.LeafOp getLeafSpec() { + return instance.getLeafSpec(); + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder setLeafSpec(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.setLeafSpec(value); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder setLeafSpec( + com.cosmos.ics23.v1.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeafSpec(builderForValue.build()); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder mergeLeafSpec(com.cosmos.ics23.v1.LeafOp value) { + copyOnWrite(); + instance.mergeLeafSpec(value); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder clearLeafSpec() { copyOnWrite(); + instance.clearLeafSpec(); + return this; + } + + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public boolean hasInnerSpec() { + return instance.hasInnerSpec(); + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.InnerSpec getInnerSpec() { + return instance.getInnerSpec(); + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder setInnerSpec(com.cosmos.ics23.v1.InnerSpec value) { + copyOnWrite(); + instance.setInnerSpec(value); + return this; + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder setInnerSpec( + com.cosmos.ics23.v1.InnerSpec.Builder builderForValue) { + copyOnWrite(); + instance.setInnerSpec(builderForValue.build()); + return this; + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder mergeInnerSpec(com.cosmos.ics23.v1.InnerSpec value) { + copyOnWrite(); + instance.mergeInnerSpec(value); + return this; + } + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder clearInnerSpec() { copyOnWrite(); + instance.clearInnerSpec(); + return this; + } + + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + @java.lang.Override + public int getMaxDepth() { + return instance.getMaxDepth(); + } + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @param value The maxDepth to set. + * @return This builder for chaining. + */ + public Builder setMaxDepth(int value) { + copyOnWrite(); + instance.setMaxDepth(value); + return this; + } + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return This builder for chaining. + */ + public Builder clearMaxDepth() { + copyOnWrite(); + instance.clearMaxDepth(); + return this; + } + + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + @java.lang.Override + public int getMinDepth() { + return instance.getMinDepth(); + } + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @param value The minDepth to set. + * @return This builder for chaining. + */ + public Builder setMinDepth(int value) { + copyOnWrite(); + instance.setMinDepth(value); + return this; + } + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return This builder for chaining. + */ + public Builder clearMinDepth() { + copyOnWrite(); + instance.clearMinDepth(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.ics23.v1.ProofSpec) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.ics23.v1.ProofSpec(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "leafSpec_", + "innerSpec_", + "maxDepth_", + "minDepth_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + + "\u0004\u0004\u0004"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.ics23.v1.ProofSpec.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.ics23.v1.ProofSpec) + private static final com.cosmos.ics23.v1.ProofSpec DEFAULT_INSTANCE; + static { + ProofSpec defaultInstance = new ProofSpec(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ProofSpec.class, defaultInstance); + } + + public static com.cosmos.ics23.v1.ProofSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpecOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpecOrBuilder.java new file mode 100644 index 000000000..0474e959a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofSpecOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public interface ProofSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.ics23.v1.ProofSpec) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + * @return Whether the leafSpec field is set. + */ + boolean hasLeafSpec(); + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .cosmos.ics23.v1.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + * @return The leafSpec. + */ + com.cosmos.ics23.v1.LeafOp getLeafSpec(); + + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + * @return Whether the innerSpec field is set. + */ + boolean hasInnerSpec(); + /** + * .cosmos.ics23.v1.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + * @return The innerSpec. + */ + com.cosmos.ics23.v1.InnerSpec getInnerSpec(); + + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + int getMaxDepth(); + + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + int getMinDepth(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofsProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofsProto.java new file mode 100644 index 000000000..ccf4bd65c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/ics23/v1/ProofsProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/ics23/v1/proofs.proto + +package com.cosmos.ics23.v1; + +public final class ProofsProto { + private ProofsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java new file mode 100644 index 000000000..7010f5392 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java @@ -0,0 +1,474 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +/** + *
+ * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
+ * upgrade.
+ * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
+ * proposals, see MsgCancelUpgrade.
+ * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ +@java.lang.Deprecated public final class CancelSoftwareUpgradeProposal extends + com.google.protobuf.GeneratedMessageLite< + CancelSoftwareUpgradeProposal, CancelSoftwareUpgradeProposal.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + CancelSoftwareUpgradeProposalOrBuilder { + private CancelSoftwareUpgradeProposal() { + title_ = ""; + description_ = ""; + } + public static final int TITLE_FIELD_NUMBER = 1; + private java.lang.String title_; + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software
+   * upgrade.
+   * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
+   * proposals, see MsgCancelUpgrade.
+   * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposalOrBuilder { + // Construct using com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "title_", + "description_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + private static final com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal DEFAULT_INSTANCE; + static { + CancelSoftwareUpgradeProposal defaultInstance = new CancelSoftwareUpgradeProposal(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CancelSoftwareUpgradeProposal.class, defaultInstance); + } + + public static com.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposalOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposalOrBuilder.java new file mode 100644 index 000000000..98433c695 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposalOrBuilder.java @@ -0,0 +1,49 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +@java.lang.Deprecated public interface CancelSoftwareUpgradeProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersion.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersion.java new file mode 100644 index 000000000..099f0312e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersion.java @@ -0,0 +1,411 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +/** + *
+ * ModuleVersion specifies a module and its consensus version.
+ * Since: cosmos-sdk 0.43
+ * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.ModuleVersion} + */ +public final class ModuleVersion extends + com.google.protobuf.GeneratedMessageLite< + ModuleVersion, ModuleVersion.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.upgrade.v1beta1.ModuleVersion) + ModuleVersionOrBuilder { + private ModuleVersion() { + name_ = ""; + } + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.String name_; + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return name_; + } + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(name_); + } + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + */ + private void setName( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + name_ = value; + } + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + */ + private void clearName() { + + name_ = getDefaultInstance().getName(); + } + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + */ + private void setNameBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + name_ = value.toStringUtf8(); + + } + + public static final int VERSION_FIELD_NUMBER = 2; + private long version_; + /** + *
+   * consensus version of the app module
+   * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public long getVersion() { + return version_; + } + /** + *
+   * consensus version of the app module
+   * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @param value The version to set. + */ + private void setVersion(long value) { + + version_ = value; + } + /** + *
+   * consensus version of the app module
+   * 
+ * + * uint64 version = 2 [json_name = "version"]; + */ + private void clearVersion() { + + version_ = 0L; + } + + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.ModuleVersion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.upgrade.v1beta1.ModuleVersion prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ModuleVersion specifies a module and its consensus version.
+   * Since: cosmos-sdk 0.43
+   * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.ModuleVersion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.upgrade.v1beta1.ModuleVersion, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.upgrade.v1beta1.ModuleVersion) + com.cosmos.upgrade.v1beta1.ModuleVersionOrBuilder { + // Construct using com.cosmos.upgrade.v1beta1.ModuleVersion.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * name of the app module
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return instance.getName(); + } + /** + *
+     * name of the app module
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return instance.getNameBytes(); + } + /** + *
+     * name of the app module
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + copyOnWrite(); + instance.setName(value); + return this; + } + /** + *
+     * name of the app module
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + copyOnWrite(); + instance.clearName(); + return this; + } + /** + *
+     * name of the app module
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNameBytes(value); + return this; + } + + /** + *
+     * consensus version of the app module
+     * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public long getVersion() { + return instance.getVersion(); + } + /** + *
+     * consensus version of the app module
+     * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(long value) { + copyOnWrite(); + instance.setVersion(value); + return this; + } + /** + *
+     * consensus version of the app module
+     * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + copyOnWrite(); + instance.clearVersion(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.upgrade.v1beta1.ModuleVersion) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.upgrade.v1beta1.ModuleVersion(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "name_", + "version_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.upgrade.v1beta1.ModuleVersion.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.upgrade.v1beta1.ModuleVersion) + private static final com.cosmos.upgrade.v1beta1.ModuleVersion DEFAULT_INSTANCE; + static { + ModuleVersion defaultInstance = new ModuleVersion(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ModuleVersion.class, defaultInstance); + } + + public static com.cosmos.upgrade.v1beta1.ModuleVersion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersionOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersionOrBuilder.java new file mode 100644 index 000000000..fde6e4104 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/ModuleVersionOrBuilder.java @@ -0,0 +1,39 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +public interface ModuleVersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.upgrade.v1beta1.ModuleVersion) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name of the app module
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * consensus version of the app module
+   * 
+ * + * uint64 version = 2 [json_name = "version"]; + * @return The version. + */ + long getVersion(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/Plan.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/Plan.java new file mode 100644 index 000000000..0317f90dd --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/Plan.java @@ -0,0 +1,937 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +/** + *
+ * Plan specifies information about a planned upgrade and when it should occur.
+ * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.Plan} + */ +public final class Plan extends + com.google.protobuf.GeneratedMessageLite< + Plan, Plan.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.upgrade.v1beta1.Plan) + PlanOrBuilder { + private Plan() { + name_ = ""; + info_ = ""; + } + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.String name_; + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return name_; + } + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(name_); + } + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + */ + private void setName( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + name_ = value; + } + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + */ + private void clearName() { + + name_ = getDefaultInstance().getName(); + } + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + */ + private void setNameBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + name_ = value.toStringUtf8(); + + } + + public static final int TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp time_; + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasTime() { + return time_ != null; + } + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.Timestamp getTime() { + return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; + } + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + private void setTime(com.google.protobuf.Timestamp value) { + value.getClass(); + time_ = value; + + } + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTime(com.google.protobuf.Timestamp value) { + value.getClass(); + if (time_ != null && + time_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + time_ = + com.google.protobuf.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial(); + } else { + time_ = value; + } + + } + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + private void clearTime() { time_ = null; + + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private long height_; + /** + *
+   * The height at which the upgrade must be performed.
+   * 
+ * + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + *
+   * The height at which the upgrade must be performed.
+   * 
+ * + * int64 height = 3 [json_name = "height"]; + * @param value The height to set. + */ + private void setHeight(long value) { + + height_ = value; + } + /** + *
+   * The height at which the upgrade must be performed.
+   * 
+ * + * int64 height = 3 [json_name = "height"]; + */ + private void clearHeight() { + + height_ = 0L; + } + + public static final int INFO_FIELD_NUMBER = 4; + private java.lang.String info_; + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @return The info. + */ + @java.lang.Override + public java.lang.String getInfo() { + return info_; + } + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @return The bytes for info. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInfoBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(info_); + } + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @param value The info to set. + */ + private void setInfo( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + info_ = value; + } + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + */ + private void clearInfo() { + + info_ = getDefaultInstance().getInfo(); + } + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @param value The bytes for info to set. + */ + private void setInfoBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + info_ = value.toStringUtf8(); + + } + + public static final int UPGRADED_CLIENT_STATE_FIELD_NUMBER = 5; + private com.google.protobuf.Any upgradedClientState_; + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasUpgradedClientState() { + return upgradedClientState_ != null; + } + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.Any getUpgradedClientState() { + return upgradedClientState_ == null ? com.google.protobuf.Any.getDefaultInstance() : upgradedClientState_; + } + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + private void setUpgradedClientState(com.google.protobuf.Any value) { + value.getClass(); + upgradedClientState_ = value; + + } + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeUpgradedClientState(com.google.protobuf.Any value) { + value.getClass(); + if (upgradedClientState_ != null && + upgradedClientState_ != com.google.protobuf.Any.getDefaultInstance()) { + upgradedClientState_ = + com.google.protobuf.Any.newBuilder(upgradedClientState_).mergeFrom(value).buildPartial(); + } else { + upgradedClientState_ = value; + } + + } + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + private void clearUpgradedClientState() { upgradedClientState_ = null; + + } + + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.Plan parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.Plan parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.Plan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.upgrade.v1beta1.Plan prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Plan specifies information about a planned upgrade and when it should occur.
+   * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.Plan} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.upgrade.v1beta1.Plan, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.upgrade.v1beta1.Plan) + com.cosmos.upgrade.v1beta1.PlanOrBuilder { + // Construct using com.cosmos.upgrade.v1beta1.Plan.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * Sets the name for the upgrade. This name will be used by the upgraded
+     * version of the software to apply any special "on-upgrade" commands during
+     * the first BeginBlock method after the upgrade is applied. It is also used
+     * to detect whether a software version can handle a given upgrade. If no
+     * upgrade handler with this name has been set in the software, it will be
+     * assumed that the software is out-of-date when the upgrade Time or Height is
+     * reached and the software will exit.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return instance.getName(); + } + /** + *
+     * Sets the name for the upgrade. This name will be used by the upgraded
+     * version of the software to apply any special "on-upgrade" commands during
+     * the first BeginBlock method after the upgrade is applied. It is also used
+     * to detect whether a software version can handle a given upgrade. If no
+     * upgrade handler with this name has been set in the software, it will be
+     * assumed that the software is out-of-date when the upgrade Time or Height is
+     * reached and the software will exit.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return instance.getNameBytes(); + } + /** + *
+     * Sets the name for the upgrade. This name will be used by the upgraded
+     * version of the software to apply any special "on-upgrade" commands during
+     * the first BeginBlock method after the upgrade is applied. It is also used
+     * to detect whether a software version can handle a given upgrade. If no
+     * upgrade handler with this name has been set in the software, it will be
+     * assumed that the software is out-of-date when the upgrade Time or Height is
+     * reached and the software will exit.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + copyOnWrite(); + instance.setName(value); + return this; + } + /** + *
+     * Sets the name for the upgrade. This name will be used by the upgraded
+     * version of the software to apply any special "on-upgrade" commands during
+     * the first BeginBlock method after the upgrade is applied. It is also used
+     * to detect whether a software version can handle a given upgrade. If no
+     * upgrade handler with this name has been set in the software, it will be
+     * assumed that the software is out-of-date when the upgrade Time or Height is
+     * reached and the software will exit.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + copyOnWrite(); + instance.clearName(); + return this; + } + /** + *
+     * Sets the name for the upgrade. This name will be used by the upgraded
+     * version of the software to apply any special "on-upgrade" commands during
+     * the first BeginBlock method after the upgrade is applied. It is also used
+     * to detect whether a software version can handle a given upgrade. If no
+     * upgrade handler with this name has been set in the software, it will be
+     * assumed that the software is out-of-date when the upgrade Time or Height is
+     * reached and the software will exit.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNameBytes(value); + return this; + } + + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasTime() { + return instance.hasTime(); + } + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.Timestamp getTime() { + return instance.getTime(); + } + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Deprecated public Builder setTime(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTime(value); + return this; + } + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Deprecated public Builder setTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTime(builderForValue.build()); + return this; + } + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Deprecated public Builder mergeTime(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTime(value); + return this; + } + /** + *
+     * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+     * has been removed from the SDK.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + */ + @java.lang.Deprecated public Builder clearTime() { copyOnWrite(); + instance.clearTime(); + return this; + } + + /** + *
+     * The height at which the upgrade must be performed.
+     * 
+ * + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return instance.getHeight(); + } + /** + *
+     * The height at which the upgrade must be performed.
+     * 
+ * + * int64 height = 3 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + *
+     * The height at which the upgrade must be performed.
+     * 
+ * + * int64 height = 3 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + *
+     * Any application specific upgrade info to be included on-chain
+     * such as a git commit that validators could automatically upgrade to
+     * 
+ * + * string info = 4 [json_name = "info"]; + * @return The info. + */ + @java.lang.Override + public java.lang.String getInfo() { + return instance.getInfo(); + } + /** + *
+     * Any application specific upgrade info to be included on-chain
+     * such as a git commit that validators could automatically upgrade to
+     * 
+ * + * string info = 4 [json_name = "info"]; + * @return The bytes for info. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInfoBytes() { + return instance.getInfoBytes(); + } + /** + *
+     * Any application specific upgrade info to be included on-chain
+     * such as a git commit that validators could automatically upgrade to
+     * 
+ * + * string info = 4 [json_name = "info"]; + * @param value The info to set. + * @return This builder for chaining. + */ + public Builder setInfo( + java.lang.String value) { + copyOnWrite(); + instance.setInfo(value); + return this; + } + /** + *
+     * Any application specific upgrade info to be included on-chain
+     * such as a git commit that validators could automatically upgrade to
+     * 
+ * + * string info = 4 [json_name = "info"]; + * @return This builder for chaining. + */ + public Builder clearInfo() { + copyOnWrite(); + instance.clearInfo(); + return this; + } + /** + *
+     * Any application specific upgrade info to be included on-chain
+     * such as a git commit that validators could automatically upgrade to
+     * 
+ * + * string info = 4 [json_name = "info"]; + * @param value The bytes for info to set. + * @return This builder for chaining. + */ + public Builder setInfoBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setInfoBytes(value); + return this; + } + + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated public boolean hasUpgradedClientState() { + return instance.hasUpgradedClientState(); + } + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.Any getUpgradedClientState() { + return instance.getUpgradedClientState(); + } + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Deprecated public Builder setUpgradedClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.setUpgradedClientState(value); + return this; + } + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Deprecated public Builder setUpgradedClientState( + com.google.protobuf.Any.Builder builderForValue) { + copyOnWrite(); + instance.setUpgradedClientState(builderForValue.build()); + return this; + } + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Deprecated public Builder mergeUpgradedClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.mergeUpgradedClientState(value); + return this; + } + /** + *
+     * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+     * moved to the IBC module in the sub module 02-client.
+     * If this field is not empty, an error will be thrown.
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + */ + @java.lang.Deprecated public Builder clearUpgradedClientState() { copyOnWrite(); + instance.clearUpgradedClientState(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.upgrade.v1beta1.Plan) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.upgrade.v1beta1.Plan(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "name_", + "time_", + "height_", + "info_", + "upgradedClientState_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\u0208\u0002\t" + + "\u0003\u0002\u0004\u0208\u0005\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.upgrade.v1beta1.Plan.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.upgrade.v1beta1.Plan) + private static final com.cosmos.upgrade.v1beta1.Plan DEFAULT_INSTANCE; + static { + Plan defaultInstance = new Plan(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Plan.class, defaultInstance); + } + + public static com.cosmos.upgrade.v1beta1.Plan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/PlanOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/PlanOrBuilder.java new file mode 100644 index 000000000..c4e2ee0db --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/PlanOrBuilder.java @@ -0,0 +1,127 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +public interface PlanOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.upgrade.v1beta1.Plan) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * Sets the name for the upgrade. This name will be used by the upgraded
+   * version of the software to apply any special "on-upgrade" commands during
+   * the first BeginBlock method after the upgrade is applied. It is also used
+   * to detect whether a software version can handle a given upgrade. If no
+   * upgrade handler with this name has been set in the software, it will be
+   * assumed that the software is out-of-date when the upgrade Time or Height is
+   * reached and the software will exit.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + * @deprecated cosmos.upgrade.v1beta1.Plan.time is deprecated. + * See cosmos/upgrade/v1beta1/upgrade.proto;l=30 + * @return Whether the time field is set. + */ + @java.lang.Deprecated boolean hasTime(); + /** + *
+   * Deprecated: Time based upgrades have been deprecated. Time based upgrade logic
+   * has been removed from the SDK.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Timestamp time = 2 [json_name = "time", deprecated = true, (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true, (.amino.dont_omitempty) = true]; + * @deprecated cosmos.upgrade.v1beta1.Plan.time is deprecated. + * See cosmos/upgrade/v1beta1/upgrade.proto;l=30 + * @return The time. + */ + @java.lang.Deprecated com.google.protobuf.Timestamp getTime(); + + /** + *
+   * The height at which the upgrade must be performed.
+   * 
+ * + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + long getHeight(); + + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @return The info. + */ + java.lang.String getInfo(); + /** + *
+   * Any application specific upgrade info to be included on-chain
+   * such as a git commit that validators could automatically upgrade to
+   * 
+ * + * string info = 4 [json_name = "info"]; + * @return The bytes for info. + */ + com.google.protobuf.ByteString + getInfoBytes(); + + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + * @deprecated cosmos.upgrade.v1beta1.Plan.upgraded_client_state is deprecated. + * See cosmos/upgrade/v1beta1/upgrade.proto;l=43 + * @return Whether the upgradedClientState field is set. + */ + @java.lang.Deprecated boolean hasUpgradedClientState(); + /** + *
+   * Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been
+   * moved to the IBC module in the sub module 02-client.
+   * If this field is not empty, an error will be thrown.
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 5 [json_name = "upgradedClientState", deprecated = true]; + * @deprecated cosmos.upgrade.v1beta1.Plan.upgraded_client_state is deprecated. + * See cosmos/upgrade/v1beta1/upgrade.proto;l=43 + * @return The upgradedClientState. + */ + @java.lang.Deprecated com.google.protobuf.Any getUpgradedClientState(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java new file mode 100644 index 000000000..0e7d04d8f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java @@ -0,0 +1,612 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +/** + *
+ * SoftwareUpgradeProposal is a gov Content type for initiating a software
+ * upgrade.
+ * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
+ * proposals, see MsgSoftwareUpgrade.
+ * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} + */ +@java.lang.Deprecated public final class SoftwareUpgradeProposal extends + com.google.protobuf.GeneratedMessageLite< + SoftwareUpgradeProposal, SoftwareUpgradeProposal.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + SoftwareUpgradeProposalOrBuilder { + private SoftwareUpgradeProposal() { + title_ = ""; + description_ = ""; + } + public static final int TITLE_FIELD_NUMBER = 1; + private java.lang.String title_; + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static final int PLAN_FIELD_NUMBER = 3; + private com.cosmos.upgrade.v1beta1.Plan plan_; + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + public boolean hasPlan() { + return plan_ != null; + } + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + public com.cosmos.upgrade.v1beta1.Plan getPlan() { + return plan_ == null ? com.cosmos.upgrade.v1beta1.Plan.getDefaultInstance() : plan_; + } + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + private void setPlan(com.cosmos.upgrade.v1beta1.Plan value) { + value.getClass(); + plan_ = value; + + } + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePlan(com.cosmos.upgrade.v1beta1.Plan value) { + value.getClass(); + if (plan_ != null && + plan_ != com.cosmos.upgrade.v1beta1.Plan.getDefaultInstance()) { + plan_ = + com.cosmos.upgrade.v1beta1.Plan.newBuilder(plan_).mergeFrom(value).buildPartial(); + } else { + plan_ = value; + } + + } + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + private void clearPlan() { plan_ = null; + + } + + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * SoftwareUpgradeProposal is a gov Content type for initiating a software
+   * upgrade.
+   * Deprecated: This legacy proposal is deprecated in favor of Msg-based gov
+   * proposals, see MsgSoftwareUpgrade.
+   * 
+ * + * Protobuf type {@code cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposalOrBuilder { + // Construct using com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + *
+     * title of the proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + *
+     * description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + public boolean hasPlan() { + return instance.hasPlan(); + } + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + @java.lang.Override + public com.cosmos.upgrade.v1beta1.Plan getPlan() { + return instance.getPlan(); + } + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + public Builder setPlan(com.cosmos.upgrade.v1beta1.Plan value) { + copyOnWrite(); + instance.setPlan(value); + return this; + } + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + public Builder setPlan( + com.cosmos.upgrade.v1beta1.Plan.Builder builderForValue) { + copyOnWrite(); + instance.setPlan(builderForValue.build()); + return this; + } + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + public Builder mergePlan(com.cosmos.upgrade.v1beta1.Plan value) { + copyOnWrite(); + instance.mergePlan(value); + return this; + } + /** + *
+     * plan of the proposal
+     * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + */ + public Builder clearPlan() { copyOnWrite(); + instance.clearPlan(); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "title_", + "description_", + "plan_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + private static final com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal DEFAULT_INSTANCE; + static { + SoftwareUpgradeProposal defaultInstance = new SoftwareUpgradeProposal(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SoftwareUpgradeProposal.class, defaultInstance); + } + + public static com.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposalOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposalOrBuilder.java new file mode 100644 index 000000000..c00373107 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/SoftwareUpgradeProposalOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +@java.lang.Deprecated public interface SoftwareUpgradeProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * title of the proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + * @return Whether the plan field is set. + */ + boolean hasPlan(); + /** + *
+   * plan of the proposal
+   * 
+ * + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false, (.amino.dont_omitempty) = true]; + * @return The plan. + */ + com.cosmos.upgrade.v1beta1.Plan getPlan(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/UpgradeProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/UpgradeProto.java new file mode 100644 index 000000000..25aa9dc4c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos/upgrade/v1beta1/UpgradeProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos/upgrade/v1beta1/upgrade.proto + +package com.cosmos.upgrade.v1beta1; + +public final class UpgradeProto { + private UpgradeProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/CosmosProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/CosmosProto.java new file mode 100644 index 000000000..0b2bf75a6 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/CosmosProto.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +public final class CosmosProto { + private CosmosProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.cosmos_proto.CosmosProto.implementsInterface); + registry.add(com.cosmos_proto.CosmosProto.acceptsInterface); + registry.add(com.cosmos_proto.CosmosProto.scalar); + registry.add(com.cosmos_proto.CosmosProto.declareInterface); + registry.add(com.cosmos_proto.CosmosProto.declareScalar); + } + public static final int IMPLEMENTS_INTERFACE_FIELD_NUMBER = 93001; + /** + *
+   * implements_interface is used to indicate the type name of the interface
+   * that a message implements so that it can be used in google.protobuf.Any
+   * fields that accept that interface. A message can implement multiple
+   * interfaces. Interfaces should be declared using a declare_interface
+   * file option.
+   * 
+ * + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.util.List> implementsInterface = com.google.protobuf.GeneratedMessageLite + .newRepeatedGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + null, + null, + 93001, + com.google.protobuf.WireFormat.FieldType.STRING, + false, + java.lang.String.class); + public static final int ACCEPTS_INTERFACE_FIELD_NUMBER = 93001; + /** + *
+   * accepts_interface is used to annotate that a google.protobuf.Any
+   * field accepts messages that implement the specified interface.
+   * Interfaces should be declared using a declare_interface file option.
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> acceptsInterface = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 93001, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int SCALAR_FIELD_NUMBER = 93002; + /** + *
+   * scalar is used to indicate that this field follows the formatting defined
+   * by the named scalar which should be declared with declare_scalar. Code
+   * generators may choose to use this information to map this field to a
+   * language-specific type representing the scalar.
+   * 
+ * + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> scalar = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 93002, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int DECLARE_INTERFACE_FIELD_NUMBER = 793021; + /** + *
+   * declare_interface declares an interface type to be used with
+   * accepts_interface and implements_interface. Interface names are
+   * expected to follow the following convention such that their declaration
+   * can be discovered by tools: for a given interface type a.b.C, it is
+   * expected that the declaration will be found in a protobuf file named
+   * a/b/interfaces.proto in the file descriptor set.
+   * 
+ * + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.util.List> declareInterface = com.google.protobuf.GeneratedMessageLite + .newRepeatedGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + com.cosmos_proto.InterfaceDescriptor.getDefaultInstance(), + null, + 793021, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + false, + com.cosmos_proto.InterfaceDescriptor.class); + public static final int DECLARE_SCALAR_FIELD_NUMBER = 793022; + /** + *
+   * declare_scalar declares a scalar type to be used with
+   * the scalar field option. Scalar names are
+   * expected to follow the following convention such that their declaration
+   * can be discovered by tools: for a given scalar type a.b.C, it is
+   * expected that the declaration will be found in a protobuf file named
+   * a/b/scalars.proto in the file descriptor set.
+   * 
+ * + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.util.List> declareScalar = com.google.protobuf.GeneratedMessageLite + .newRepeatedGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + com.cosmos_proto.ScalarDescriptor.getDefaultInstance(), + null, + 793022, + com.google.protobuf.WireFormat.FieldType.MESSAGE, + false, + com.cosmos_proto.ScalarDescriptor.class); + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptor.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptor.java new file mode 100644 index 000000000..5d11e0b26 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptor.java @@ -0,0 +1,510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +/** + *
+ * InterfaceDescriptor describes an interface type to be used with
+ * accepts_interface and implements_interface and declared by declare_interface.
+ * 
+ * + * Protobuf type {@code cosmos_proto.InterfaceDescriptor} + */ +public final class InterfaceDescriptor extends + com.google.protobuf.GeneratedMessageLite< + InterfaceDescriptor, InterfaceDescriptor.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos_proto.InterfaceDescriptor) + InterfaceDescriptorOrBuilder { + private InterfaceDescriptor() { + name_ = ""; + description_ = ""; + } + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.String name_; + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return name_; + } + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(name_); + } + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + */ + private void setName( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + name_ = value; + } + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + */ + private void clearName() { + + name_ = getDefaultInstance().getName(); + } + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + */ + private void setNameBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + name_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos_proto.InterfaceDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.InterfaceDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.InterfaceDescriptor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos_proto.InterfaceDescriptor prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * InterfaceDescriptor describes an interface type to be used with
+   * accepts_interface and implements_interface and declared by declare_interface.
+   * 
+ * + * Protobuf type {@code cosmos_proto.InterfaceDescriptor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos_proto.InterfaceDescriptor, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos_proto.InterfaceDescriptor) + com.cosmos_proto.InterfaceDescriptorOrBuilder { + // Construct using com.cosmos_proto.InterfaceDescriptor.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * name is the name of the interface. It should be a short-name (without
+     * a period) such that the fully qualified name of the interface will be
+     * package.name, ex. for the package a.b and interface named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return instance.getName(); + } + /** + *
+     * name is the name of the interface. It should be a short-name (without
+     * a period) such that the fully qualified name of the interface will be
+     * package.name, ex. for the package a.b and interface named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return instance.getNameBytes(); + } + /** + *
+     * name is the name of the interface. It should be a short-name (without
+     * a period) such that the fully qualified name of the interface will be
+     * package.name, ex. for the package a.b and interface named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + copyOnWrite(); + instance.setName(value); + return this; + } + /** + *
+     * name is the name of the interface. It should be a short-name (without
+     * a period) such that the fully qualified name of the interface will be
+     * package.name, ex. for the package a.b and interface named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + copyOnWrite(); + instance.clearName(); + return this; + } + /** + *
+     * name is the name of the interface. It should be a short-name (without
+     * a period) such that the fully qualified name of the interface will be
+     * package.name, ex. for the package a.b and interface named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNameBytes(value); + return this; + } + + /** + *
+     * description is a human-readable description of the interface and its
+     * purpose.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + *
+     * description is a human-readable description of the interface and its
+     * purpose.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + *
+     * description is a human-readable description of the interface and its
+     * purpose.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + *
+     * description is a human-readable description of the interface and its
+     * purpose.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + *
+     * description is a human-readable description of the interface and its
+     * purpose.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos_proto.InterfaceDescriptor) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos_proto.InterfaceDescriptor(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "name_", + "description_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos_proto.InterfaceDescriptor.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos_proto.InterfaceDescriptor) + private static final com.cosmos_proto.InterfaceDescriptor DEFAULT_INSTANCE; + static { + InterfaceDescriptor defaultInstance = new InterfaceDescriptor(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + InterfaceDescriptor.class, defaultInstance); + } + + public static com.cosmos_proto.InterfaceDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptorOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptorOrBuilder.java new file mode 100644 index 000000000..dfeb76afe --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/InterfaceDescriptorOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +public interface InterfaceDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos_proto.InterfaceDescriptor) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name is the name of the interface. It should be a short-name (without
+   * a period) such that the fully qualified name of the interface will be
+   * package.name, ex. for the package a.b and interface named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * description is a human-readable description of the interface and its
+   * purpose.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptor.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptor.java new file mode 100644 index 000000000..2b3ec259d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptor.java @@ -0,0 +1,949 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +/** + *
+ * ScalarDescriptor describes an scalar type to be used with
+ * the scalar field option and declared by declare_scalar.
+ * Scalars extend simple protobuf built-in types with additional
+ * syntax and semantics, for instance to represent big integers.
+ * Scalars should ideally define an encoding such that there is only one
+ * valid syntactical representation for a given semantic meaning,
+ * i.e. the encoding should be deterministic.
+ * 
+ * + * Protobuf type {@code cosmos_proto.ScalarDescriptor} + */ +public final class ScalarDescriptor extends + com.google.protobuf.GeneratedMessageLite< + ScalarDescriptor, ScalarDescriptor.Builder> implements + // @@protoc_insertion_point(message_implements:cosmos_proto.ScalarDescriptor) + ScalarDescriptorOrBuilder { + private ScalarDescriptor() { + name_ = ""; + description_ = ""; + fieldType_ = emptyIntList(); + } + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.String name_; + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return name_; + } + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(name_); + } + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + */ + private void setName( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + name_ = value; + } + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + */ + private void clearName() { + + name_ = getDefaultInstance().getName(); + } + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + */ + private void setNameBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + name_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static final int FIELD_TYPE_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.IntList fieldType_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.cosmos_proto.ScalarType> fieldType_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.cosmos_proto.ScalarType>() { + @java.lang.Override + public com.cosmos_proto.ScalarType convert(java.lang.Integer from) { + com.cosmos_proto.ScalarType result = com.cosmos_proto.ScalarType.forNumber(from); + return result == null ? com.cosmos_proto.ScalarType.UNRECOGNIZED : result; + } + }; + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the fieldType. + */ + @java.lang.Override + public java.util.List getFieldTypeList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.cosmos_proto.ScalarType>(fieldType_, fieldType_converter_); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return The count of fieldType. + */ + @java.lang.Override + public int getFieldTypeCount() { + return fieldType_.size(); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the element to return. + * @return The fieldType at the given index. + */ + @java.lang.Override + public com.cosmos_proto.ScalarType getFieldType(int index) { + com.cosmos_proto.ScalarType result = com.cosmos_proto.ScalarType.forNumber(fieldType_.getInt(index)); + return result == null ? com.cosmos_proto.ScalarType.UNRECOGNIZED : result; + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the enum numeric values on the wire for fieldType. + */ + @java.lang.Override + public java.util.List + getFieldTypeValueList() { + return fieldType_; + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fieldType at the given index. + */ + @java.lang.Override + public int getFieldTypeValue(int index) { + return fieldType_.getInt(index); + } + private int fieldTypeMemoizedSerializedSize; + private void ensureFieldTypeIsMutable() { + com.google.protobuf.Internal.IntList tmp = fieldType_; + if (!tmp.isModifiable()) { + fieldType_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index to set the value at. + * @param value The fieldType to set. + */ + private void setFieldType( + int index, com.cosmos_proto.ScalarType value) { + value.getClass(); + ensureFieldTypeIsMutable(); + fieldType_.setInt(index, value.getNumber()); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param value The fieldType to add. + */ + private void addFieldType(com.cosmos_proto.ScalarType value) { + value.getClass(); + ensureFieldTypeIsMutable(); + fieldType_.addInt(value.getNumber()); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param values The fieldType to add. + */ + private void addAllFieldType( + java.lang.Iterable values) { + ensureFieldTypeIsMutable(); + for (com.cosmos_proto.ScalarType value : values) { + fieldType_.addInt(value.getNumber()); + } + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + */ + private void clearFieldType() { + fieldType_ = emptyIntList(); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param value The enum numeric value on the wire for fieldType to set. + */ + private void setFieldTypeValue( + int index, int value) { + ensureFieldTypeIsMutable(); + fieldType_.setInt(index, value); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param value The enum numeric value on the wire for fieldType to add. + */ + private void addFieldTypeValue(int value) { + ensureFieldTypeIsMutable(); + fieldType_.addInt(value); + } + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param values The enum numeric values on the wire for fieldType to add. + */ + private void addAllFieldTypeValue( + java.lang.Iterable values) { + ensureFieldTypeIsMutable(); + for (int value : values) { + fieldType_.addInt(value); + } + } + + public static com.cosmos_proto.ScalarDescriptor parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos_proto.ScalarDescriptor parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.ScalarDescriptor parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.cosmos_proto.ScalarDescriptor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.cosmos_proto.ScalarDescriptor prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ScalarDescriptor describes an scalar type to be used with
+   * the scalar field option and declared by declare_scalar.
+   * Scalars extend simple protobuf built-in types with additional
+   * syntax and semantics, for instance to represent big integers.
+   * Scalars should ideally define an encoding such that there is only one
+   * valid syntactical representation for a given semantic meaning,
+   * i.e. the encoding should be deterministic.
+   * 
+ * + * Protobuf type {@code cosmos_proto.ScalarDescriptor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.cosmos_proto.ScalarDescriptor, Builder> implements + // @@protoc_insertion_point(builder_implements:cosmos_proto.ScalarDescriptor) + com.cosmos_proto.ScalarDescriptorOrBuilder { + // Construct using com.cosmos_proto.ScalarDescriptor.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * name is the name of the scalar. It should be a short-name (without
+     * a period) such that the fully qualified name of the scalar will be
+     * package.name, ex. for the package a.b and scalar named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + return instance.getName(); + } + /** + *
+     * name is the name of the scalar. It should be a short-name (without
+     * a period) such that the fully qualified name of the scalar will be
+     * package.name, ex. for the package a.b and scalar named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + return instance.getNameBytes(); + } + /** + *
+     * name is the name of the scalar. It should be a short-name (without
+     * a period) such that the fully qualified name of the scalar will be
+     * package.name, ex. for the package a.b and scalar named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + copyOnWrite(); + instance.setName(value); + return this; + } + /** + *
+     * name is the name of the scalar. It should be a short-name (without
+     * a period) such that the fully qualified name of the scalar will be
+     * package.name, ex. for the package a.b and scalar named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + copyOnWrite(); + instance.clearName(); + return this; + } + /** + *
+     * name is the name of the scalar. It should be a short-name (without
+     * a period) such that the fully qualified name of the scalar will be
+     * package.name, ex. for the package a.b and scalar named C, the
+     * fully-qualified name will be a.b.C.
+     * 
+ * + * string name = 1 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNameBytes(value); + return this; + } + + /** + *
+     * description is a human-readable description of the scalar and its
+     * encoding format. For instance a big integer or decimal scalar should
+     * specify precisely the expected encoding format.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + *
+     * description is a human-readable description of the scalar and its
+     * encoding format. For instance a big integer or decimal scalar should
+     * specify precisely the expected encoding format.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + *
+     * description is a human-readable description of the scalar and its
+     * encoding format. For instance a big integer or decimal scalar should
+     * specify precisely the expected encoding format.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + *
+     * description is a human-readable description of the scalar and its
+     * encoding format. For instance a big integer or decimal scalar should
+     * specify precisely the expected encoding format.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + *
+     * description is a human-readable description of the scalar and its
+     * encoding format. For instance a big integer or decimal scalar should
+     * specify precisely the expected encoding format.
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the fieldType. + */ + @java.lang.Override + public java.util.List getFieldTypeList() { + return instance.getFieldTypeList(); + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return The count of fieldType. + */ + @java.lang.Override + public int getFieldTypeCount() { + return instance.getFieldTypeCount(); + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the element to return. + * @return The fieldType at the given index. + */ + @java.lang.Override + public com.cosmos_proto.ScalarType getFieldType(int index) { + return instance.getFieldType(index); + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index to set the value at. + * @param value The fieldType to set. + * @return This builder for chaining. + */ + public Builder setFieldType( + int index, com.cosmos_proto.ScalarType value) { + copyOnWrite(); + instance.setFieldType(index, value); + return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param value The fieldType to add. + * @return This builder for chaining. + */ + public Builder addFieldType(com.cosmos_proto.ScalarType value) { + copyOnWrite(); + instance.addFieldType(value); + return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param values The fieldType to add. + * @return This builder for chaining. + */ + public Builder addAllFieldType( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllFieldType(values); return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return This builder for chaining. + */ + public Builder clearFieldType() { + copyOnWrite(); + instance.clearFieldType(); + return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the enum numeric values on the wire for fieldType. + */ + @java.lang.Override + public java.util.List + getFieldTypeValueList() { + return java.util.Collections.unmodifiableList( + instance.getFieldTypeValueList()); + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fieldType at the given index. + */ + @java.lang.Override + public int getFieldTypeValue(int index) { + return instance.getFieldTypeValue(index); + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for fieldType to set. + * @return This builder for chaining. + */ + public Builder setFieldTypeValue( + int index, int value) { + copyOnWrite(); + instance.setFieldTypeValue(index, value); + return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param value The enum numeric value on the wire for fieldType to add. + * @return This builder for chaining. + */ + public Builder addFieldTypeValue(int value) { + instance.addFieldTypeValue(value); + return this; + } + /** + *
+     * field_type is the type of field with which this scalar can be used.
+     * Scalars can be used with one and only one type of field so that
+     * encoding standards and simple and clear. Currently only string and
+     * bytes fields are supported for scalars.
+     * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param values The enum numeric values on the wire for fieldType to add. + * @return This builder for chaining. + */ + public Builder addAllFieldTypeValue( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllFieldTypeValue(values); + return this; + } + + // @@protoc_insertion_point(builder_scope:cosmos_proto.ScalarDescriptor) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.cosmos_proto.ScalarDescriptor(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "name_", + "description_", + "fieldType_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u0208\u0002\u0208" + + "\u0003,"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.cosmos_proto.ScalarDescriptor.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:cosmos_proto.ScalarDescriptor) + private static final com.cosmos_proto.ScalarDescriptor DEFAULT_INSTANCE; + static { + ScalarDescriptor defaultInstance = new ScalarDescriptor(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ScalarDescriptor.class, defaultInstance); + } + + public static com.cosmos_proto.ScalarDescriptor getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptorOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptorOrBuilder.java new file mode 100644 index 000000000..9cae4f68f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarDescriptorOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +public interface ScalarDescriptorOrBuilder extends + // @@protoc_insertion_point(interface_extends:cosmos_proto.ScalarDescriptor) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
+   * name is the name of the scalar. It should be a short-name (without
+   * a period) such that the fully qualified name of the scalar will be
+   * package.name, ex. for the package a.b and scalar named C, the
+   * fully-qualified name will be a.b.C.
+   * 
+ * + * string name = 1 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * description is a human-readable description of the scalar and its
+   * encoding format. For instance a big integer or decimal scalar should
+   * specify precisely the expected encoding format.
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the fieldType. + */ + java.util.List getFieldTypeList(); + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return The count of fieldType. + */ + int getFieldTypeCount(); + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the element to return. + * @return The fieldType at the given index. + */ + com.cosmos_proto.ScalarType getFieldType(int index); + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @return A list containing the enum numeric values on the wire for fieldType. + */ + java.util.List + getFieldTypeValueList(); + /** + *
+   * field_type is the type of field with which this scalar can be used.
+   * Scalars can be used with one and only one type of field so that
+   * encoding standards and simple and clear. Currently only string and
+   * bytes fields are supported for scalars.
+   * 
+ * + * repeated .cosmos_proto.ScalarType field_type = 3 [json_name = "fieldType"]; + * @param index The index of the value to return. + * @return The enum numeric value on the wire of fieldType at the given index. + */ + int getFieldTypeValue(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarType.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarType.java new file mode 100644 index 000000000..3be018a0f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/cosmos_proto/ScalarType.java @@ -0,0 +1,103 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cosmos_proto/cosmos.proto + +package com.cosmos_proto; + +/** + * Protobuf enum {@code cosmos_proto.ScalarType} + */ +public enum ScalarType + implements com.google.protobuf.Internal.EnumLite { + /** + * SCALAR_TYPE_UNSPECIFIED = 0; + */ + SCALAR_TYPE_UNSPECIFIED(0), + /** + * SCALAR_TYPE_STRING = 1; + */ + SCALAR_TYPE_STRING(1), + /** + * SCALAR_TYPE_BYTES = 2; + */ + SCALAR_TYPE_BYTES(2), + UNRECOGNIZED(-1), + ; + + /** + * SCALAR_TYPE_UNSPECIFIED = 0; + */ + public static final int SCALAR_TYPE_UNSPECIFIED_VALUE = 0; + /** + * SCALAR_TYPE_STRING = 1; + */ + public static final int SCALAR_TYPE_STRING_VALUE = 1; + /** + * SCALAR_TYPE_BYTES = 2; + */ + public static final int SCALAR_TYPE_BYTES_VALUE = 2; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ScalarType valueOf(int value) { + return forNumber(value); + } + + public static ScalarType forNumber(int value) { + switch (value) { + case 0: return SCALAR_TYPE_UNSPECIFIED; + case 1: return SCALAR_TYPE_STRING; + case 2: return SCALAR_TYPE_BYTES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + ScalarType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public ScalarType findValueByNumber(int number) { + return ScalarType.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return ScalarTypeVerifier.INSTANCE; + } + + private static final class ScalarTypeVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new ScalarTypeVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return ScalarType.forNumber(number) != null; + } + }; + + private final int value; + + private ScalarType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:cosmos_proto.ScalarType) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/gogoproto/GogoProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/gogoproto/GogoProto.java new file mode 100644 index 000000000..b48ab7f99 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/gogoproto/GogoProto.java @@ -0,0 +1,1325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: gogoproto/gogo.proto + +package com.gogoproto; + +public final class GogoProto { + private GogoProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + registry.add(com.gogoproto.GogoProto.goprotoEnumPrefix); + registry.add(com.gogoproto.GogoProto.goprotoEnumStringer); + registry.add(com.gogoproto.GogoProto.enumStringer); + registry.add(com.gogoproto.GogoProto.enumCustomname); + registry.add(com.gogoproto.GogoProto.enumdecl); + registry.add(com.gogoproto.GogoProto.enumvalueCustomname); + registry.add(com.gogoproto.GogoProto.goprotoGettersAll); + registry.add(com.gogoproto.GogoProto.goprotoEnumPrefixAll); + registry.add(com.gogoproto.GogoProto.goprotoStringerAll); + registry.add(com.gogoproto.GogoProto.verboseEqualAll); + registry.add(com.gogoproto.GogoProto.faceAll); + registry.add(com.gogoproto.GogoProto.gostringAll); + registry.add(com.gogoproto.GogoProto.populateAll); + registry.add(com.gogoproto.GogoProto.stringerAll); + registry.add(com.gogoproto.GogoProto.onlyoneAll); + registry.add(com.gogoproto.GogoProto.equalAll); + registry.add(com.gogoproto.GogoProto.descriptionAll); + registry.add(com.gogoproto.GogoProto.testgenAll); + registry.add(com.gogoproto.GogoProto.benchgenAll); + registry.add(com.gogoproto.GogoProto.marshalerAll); + registry.add(com.gogoproto.GogoProto.unmarshalerAll); + registry.add(com.gogoproto.GogoProto.stableMarshalerAll); + registry.add(com.gogoproto.GogoProto.sizerAll); + registry.add(com.gogoproto.GogoProto.goprotoEnumStringerAll); + registry.add(com.gogoproto.GogoProto.enumStringerAll); + registry.add(com.gogoproto.GogoProto.unsafeMarshalerAll); + registry.add(com.gogoproto.GogoProto.unsafeUnmarshalerAll); + registry.add(com.gogoproto.GogoProto.goprotoExtensionsMapAll); + registry.add(com.gogoproto.GogoProto.goprotoUnrecognizedAll); + registry.add(com.gogoproto.GogoProto.gogoprotoImport); + registry.add(com.gogoproto.GogoProto.protosizerAll); + registry.add(com.gogoproto.GogoProto.compareAll); + registry.add(com.gogoproto.GogoProto.typedeclAll); + registry.add(com.gogoproto.GogoProto.enumdeclAll); + registry.add(com.gogoproto.GogoProto.goprotoRegistration); + registry.add(com.gogoproto.GogoProto.messagenameAll); + registry.add(com.gogoproto.GogoProto.goprotoSizecacheAll); + registry.add(com.gogoproto.GogoProto.goprotoUnkeyedAll); + registry.add(com.gogoproto.GogoProto.goprotoGetters); + registry.add(com.gogoproto.GogoProto.goprotoStringer); + registry.add(com.gogoproto.GogoProto.verboseEqual); + registry.add(com.gogoproto.GogoProto.face); + registry.add(com.gogoproto.GogoProto.gostring); + registry.add(com.gogoproto.GogoProto.populate); + registry.add(com.gogoproto.GogoProto.stringer); + registry.add(com.gogoproto.GogoProto.onlyone); + registry.add(com.gogoproto.GogoProto.equal); + registry.add(com.gogoproto.GogoProto.description); + registry.add(com.gogoproto.GogoProto.testgen); + registry.add(com.gogoproto.GogoProto.benchgen); + registry.add(com.gogoproto.GogoProto.marshaler); + registry.add(com.gogoproto.GogoProto.unmarshaler); + registry.add(com.gogoproto.GogoProto.stableMarshaler); + registry.add(com.gogoproto.GogoProto.sizer); + registry.add(com.gogoproto.GogoProto.unsafeMarshaler); + registry.add(com.gogoproto.GogoProto.unsafeUnmarshaler); + registry.add(com.gogoproto.GogoProto.goprotoExtensionsMap); + registry.add(com.gogoproto.GogoProto.goprotoUnrecognized); + registry.add(com.gogoproto.GogoProto.protosizer); + registry.add(com.gogoproto.GogoProto.compare); + registry.add(com.gogoproto.GogoProto.typedecl); + registry.add(com.gogoproto.GogoProto.messagename); + registry.add(com.gogoproto.GogoProto.goprotoSizecache); + registry.add(com.gogoproto.GogoProto.goprotoUnkeyed); + registry.add(com.gogoproto.GogoProto.nullable); + registry.add(com.gogoproto.GogoProto.embed); + registry.add(com.gogoproto.GogoProto.customtype); + registry.add(com.gogoproto.GogoProto.customname); + registry.add(com.gogoproto.GogoProto.jsontag); + registry.add(com.gogoproto.GogoProto.moretags); + registry.add(com.gogoproto.GogoProto.casttype); + registry.add(com.gogoproto.GogoProto.castkey); + registry.add(com.gogoproto.GogoProto.castvalue); + registry.add(com.gogoproto.GogoProto.stdtime); + registry.add(com.gogoproto.GogoProto.stdduration); + registry.add(com.gogoproto.GogoProto.wktpointer); + registry.add(com.gogoproto.GogoProto.castrepeated); + } + public static final int GOPROTO_ENUM_PREFIX_FIELD_NUMBER = 62001; + /** + * extend .google.protobuf.EnumOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + java.lang.Boolean> goprotoEnumPrefix = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumOptions.getDefaultInstance(), + false, + null, + null, + 62001, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_ENUM_STRINGER_FIELD_NUMBER = 62021; + /** + * extend .google.protobuf.EnumOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + java.lang.Boolean> goprotoEnumStringer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumOptions.getDefaultInstance(), + false, + null, + null, + 62021, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ENUM_STRINGER_FIELD_NUMBER = 62022; + /** + * extend .google.protobuf.EnumOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + java.lang.Boolean> enumStringer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumOptions.getDefaultInstance(), + false, + null, + null, + 62022, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ENUM_CUSTOMNAME_FIELD_NUMBER = 62023; + /** + * extend .google.protobuf.EnumOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + java.lang.String> enumCustomname = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumOptions.getDefaultInstance(), + "", + null, + null, + 62023, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int ENUMDECL_FIELD_NUMBER = 62024; + /** + * extend .google.protobuf.EnumOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumOptions, + java.lang.Boolean> enumdecl = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumOptions.getDefaultInstance(), + false, + null, + null, + 62024, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ENUMVALUE_CUSTOMNAME_FIELD_NUMBER = 66001; + /** + * extend .google.protobuf.EnumValueOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.EnumValueOptions, + java.lang.String> enumvalueCustomname = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.EnumValueOptions.getDefaultInstance(), + "", + null, + null, + 66001, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int GOPROTO_GETTERS_ALL_FIELD_NUMBER = 63001; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoGettersAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63001, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_ENUM_PREFIX_ALL_FIELD_NUMBER = 63002; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoEnumPrefixAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63002, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_STRINGER_ALL_FIELD_NUMBER = 63003; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoStringerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63003, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int VERBOSE_EQUAL_ALL_FIELD_NUMBER = 63004; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> verboseEqualAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63004, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int FACE_ALL_FIELD_NUMBER = 63005; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> faceAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63005, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOSTRING_ALL_FIELD_NUMBER = 63006; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> gostringAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63006, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int POPULATE_ALL_FIELD_NUMBER = 63007; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> populateAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63007, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int STRINGER_ALL_FIELD_NUMBER = 63008; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> stringerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63008, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ONLYONE_ALL_FIELD_NUMBER = 63009; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> onlyoneAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63009, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int EQUAL_ALL_FIELD_NUMBER = 63013; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> equalAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63013, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int DESCRIPTION_ALL_FIELD_NUMBER = 63014; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> descriptionAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63014, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int TESTGEN_ALL_FIELD_NUMBER = 63015; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> testgenAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63015, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int BENCHGEN_ALL_FIELD_NUMBER = 63016; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> benchgenAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63016, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int MARSHALER_ALL_FIELD_NUMBER = 63017; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> marshalerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63017, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNMARSHALER_ALL_FIELD_NUMBER = 63018; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> unmarshalerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63018, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int STABLE_MARSHALER_ALL_FIELD_NUMBER = 63019; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> stableMarshalerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63019, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int SIZER_ALL_FIELD_NUMBER = 63020; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> sizerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63020, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_ENUM_STRINGER_ALL_FIELD_NUMBER = 63021; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoEnumStringerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63021, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ENUM_STRINGER_ALL_FIELD_NUMBER = 63022; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> enumStringerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63022, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNSAFE_MARSHALER_ALL_FIELD_NUMBER = 63023; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> unsafeMarshalerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63023, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNSAFE_UNMARSHALER_ALL_FIELD_NUMBER = 63024; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> unsafeUnmarshalerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63024, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_EXTENSIONS_MAP_ALL_FIELD_NUMBER = 63025; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoExtensionsMapAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63025, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_UNRECOGNIZED_ALL_FIELD_NUMBER = 63026; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoUnrecognizedAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63026, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOGOPROTO_IMPORT_FIELD_NUMBER = 63027; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> gogoprotoImport = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63027, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int PROTOSIZER_ALL_FIELD_NUMBER = 63028; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> protosizerAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63028, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int COMPARE_ALL_FIELD_NUMBER = 63029; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> compareAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63029, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int TYPEDECL_ALL_FIELD_NUMBER = 63030; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> typedeclAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63030, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ENUMDECL_ALL_FIELD_NUMBER = 63031; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> enumdeclAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63031, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_REGISTRATION_FIELD_NUMBER = 63032; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoRegistration = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63032, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int MESSAGENAME_ALL_FIELD_NUMBER = 63033; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> messagenameAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63033, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_SIZECACHE_ALL_FIELD_NUMBER = 63034; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoSizecacheAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63034, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_UNKEYED_ALL_FIELD_NUMBER = 63035; + /** + * extend .google.protobuf.FileOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FileOptions, + java.lang.Boolean> goprotoUnkeyedAll = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FileOptions.getDefaultInstance(), + false, + null, + null, + 63035, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_GETTERS_FIELD_NUMBER = 64001; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoGetters = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64001, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_STRINGER_FIELD_NUMBER = 64003; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoStringer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64003, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int VERBOSE_EQUAL_FIELD_NUMBER = 64004; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> verboseEqual = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64004, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int FACE_FIELD_NUMBER = 64005; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> face = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64005, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOSTRING_FIELD_NUMBER = 64006; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> gostring = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64006, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int POPULATE_FIELD_NUMBER = 64007; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> populate = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64007, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int STRINGER_FIELD_NUMBER = 67008; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> stringer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 67008, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int ONLYONE_FIELD_NUMBER = 64009; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> onlyone = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64009, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int EQUAL_FIELD_NUMBER = 64013; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> equal = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64013, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int DESCRIPTION_FIELD_NUMBER = 64014; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> description = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64014, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int TESTGEN_FIELD_NUMBER = 64015; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> testgen = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64015, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int BENCHGEN_FIELD_NUMBER = 64016; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> benchgen = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64016, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int MARSHALER_FIELD_NUMBER = 64017; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> marshaler = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64017, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNMARSHALER_FIELD_NUMBER = 64018; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> unmarshaler = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64018, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int STABLE_MARSHALER_FIELD_NUMBER = 64019; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> stableMarshaler = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64019, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int SIZER_FIELD_NUMBER = 64020; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> sizer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64020, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNSAFE_MARSHALER_FIELD_NUMBER = 64023; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> unsafeMarshaler = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64023, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int UNSAFE_UNMARSHALER_FIELD_NUMBER = 64024; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> unsafeUnmarshaler = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64024, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_EXTENSIONS_MAP_FIELD_NUMBER = 64025; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoExtensionsMap = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64025, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_UNRECOGNIZED_FIELD_NUMBER = 64026; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoUnrecognized = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64026, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int PROTOSIZER_FIELD_NUMBER = 64028; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> protosizer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64028, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int COMPARE_FIELD_NUMBER = 64029; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> compare = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64029, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int TYPEDECL_FIELD_NUMBER = 64030; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> typedecl = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64030, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int MESSAGENAME_FIELD_NUMBER = 64033; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> messagename = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64033, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_SIZECACHE_FIELD_NUMBER = 64034; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoSizecache = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64034, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int GOPROTO_UNKEYED_FIELD_NUMBER = 64035; + /** + * extend .google.protobuf.MessageOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.MessageOptions, + java.lang.Boolean> goprotoUnkeyed = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.MessageOptions.getDefaultInstance(), + false, + null, + null, + 64035, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int NULLABLE_FIELD_NUMBER = 65001; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> nullable = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 65001, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int EMBED_FIELD_NUMBER = 65002; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> embed = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 65002, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int CUSTOMTYPE_FIELD_NUMBER = 65003; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> customtype = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65003, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int CUSTOMNAME_FIELD_NUMBER = 65004; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> customname = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65004, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int JSONTAG_FIELD_NUMBER = 65005; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> jsontag = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65005, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int MORETAGS_FIELD_NUMBER = 65006; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> moretags = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65006, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int CASTTYPE_FIELD_NUMBER = 65007; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> casttype = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65007, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int CASTKEY_FIELD_NUMBER = 65008; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> castkey = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65008, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int CASTVALUE_FIELD_NUMBER = 65009; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> castvalue = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65009, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + public static final int STDTIME_FIELD_NUMBER = 65010; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> stdtime = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 65010, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int STDDURATION_FIELD_NUMBER = 65011; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> stdduration = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 65011, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int WKTPOINTER_FIELD_NUMBER = 65012; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.Boolean> wktpointer = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + false, + null, + null, + 65012, + com.google.protobuf.WireFormat.FieldType.BOOL, + java.lang.Boolean.class); + public static final int CASTREPEATED_FIELD_NUMBER = 65013; + /** + * extend .google.protobuf.FieldOptions { ... } + */ + public static final + com.google.protobuf.GeneratedMessageLite.GeneratedExtension< + com.google.protobuf.DescriptorProtos.FieldOptions, + java.lang.String> castrepeated = com.google.protobuf.GeneratedMessageLite + .newSingularGeneratedExtension( + com.google.protobuf.DescriptorProtos.FieldOptions.getDefaultInstance(), + "", + null, + null, + 65013, + com.google.protobuf.WireFormat.FieldType.STRING, + java.lang.String.class); + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStates.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStates.java new file mode 100644 index 000000000..ff72d4a68 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStates.java @@ -0,0 +1,623 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * ClientConsensusStates defines all the stored consensus states for a given
+ * client.
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.ClientConsensusStates} + */ +public final class ClientConsensusStates extends + com.google.protobuf.GeneratedMessageLite< + ClientConsensusStates, ClientConsensusStates.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.ClientConsensusStates) + ClientConsensusStatesOrBuilder { + private ClientConsensusStates() { + clientId_ = ""; + consensusStates_ = emptyProtobufList(); + } + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return clientId_; + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int CONSENSUS_STATES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList consensusStates_; + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getConsensusStatesList() { + return consensusStates_; + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public java.util.List + getConsensusStatesOrBuilderList() { + return consensusStates_; + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getConsensusStatesCount() { + return consensusStates_.size(); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.ConsensusStateWithHeight getConsensusStates(int index) { + return consensusStates_.get(index); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public com.ibc.core.client.v1.ConsensusStateWithHeightOrBuilder getConsensusStatesOrBuilder( + int index) { + return consensusStates_.get(index); + } + private void ensureConsensusStatesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = consensusStates_; + if (!tmp.isModifiable()) { + consensusStates_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void setConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight value) { + value.getClass(); + ensureConsensusStatesIsMutable(); + consensusStates_.set(index, value); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void addConsensusStates(com.ibc.core.client.v1.ConsensusStateWithHeight value) { + value.getClass(); + ensureConsensusStatesIsMutable(); + consensusStates_.add(value); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void addConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight value) { + value.getClass(); + ensureConsensusStatesIsMutable(); + consensusStates_.add(index, value); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void addAllConsensusStates( + java.lang.Iterable values) { + ensureConsensusStatesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, consensusStates_); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void clearConsensusStates() { + consensusStates_ = emptyProtobufList(); + } + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + private void removeConsensusStates(int index) { + ensureConsensusStatesIsMutable(); + consensusStates_.remove(index); + } + + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientConsensusStates parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.ClientConsensusStates prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ClientConsensusStates defines all the stored consensus states for a given
+   * client.
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.ClientConsensusStates} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.ClientConsensusStates, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.ClientConsensusStates) + com.ibc.core.client.v1.ClientConsensusStatesOrBuilder { + // Construct using com.ibc.core.client.v1.ClientConsensusStates.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return This builder for chaining. + */ + public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getConsensusStatesList() { + return java.util.Collections.unmodifiableList( + instance.getConsensusStatesList()); + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getConsensusStatesCount() { + return instance.getConsensusStatesCount(); + }/** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.ConsensusStateWithHeight getConsensusStates(int index) { + return instance.getConsensusStates(index); + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder setConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight value) { + copyOnWrite(); + instance.setConsensusStates(index, value); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder setConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight.Builder builderForValue) { + copyOnWrite(); + instance.setConsensusStates(index, + builderForValue.build()); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder addConsensusStates(com.ibc.core.client.v1.ConsensusStateWithHeight value) { + copyOnWrite(); + instance.addConsensusStates(value); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder addConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight value) { + copyOnWrite(); + instance.addConsensusStates(index, value); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder addConsensusStates( + com.ibc.core.client.v1.ConsensusStateWithHeight.Builder builderForValue) { + copyOnWrite(); + instance.addConsensusStates(builderForValue.build()); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder addConsensusStates( + int index, com.ibc.core.client.v1.ConsensusStateWithHeight.Builder builderForValue) { + copyOnWrite(); + instance.addConsensusStates(index, + builderForValue.build()); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder addAllConsensusStates( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllConsensusStates(values); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder clearConsensusStates() { + copyOnWrite(); + instance.clearConsensusStates(); + return this; + } + /** + *
+     * consensus states and their heights associated with the client
+     * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + public Builder removeConsensusStates(int index) { + copyOnWrite(); + instance.removeConsensusStates(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.ClientConsensusStates) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.ClientConsensusStates(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "consensusStates_", + com.ibc.core.client.v1.ConsensusStateWithHeight.class, + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0001\u0000\u0001\u0208\u0002\u001b" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.ClientConsensusStates.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.ClientConsensusStates) + private static final com.ibc.core.client.v1.ClientConsensusStates DEFAULT_INSTANCE; + static { + ClientConsensusStates defaultInstance = new ClientConsensusStates(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ClientConsensusStates.class, defaultInstance); + } + + public static com.ibc.core.client.v1.ClientConsensusStates getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStatesOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStatesOrBuilder.java new file mode 100644 index 000000000..6cd74e196 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientConsensusStatesOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface ClientConsensusStatesOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.ClientConsensusStates) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + java.lang.String getClientId(); + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + java.util.List + getConsensusStatesList(); + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + com.ibc.core.client.v1.ConsensusStateWithHeight getConsensusStates(int index); + /** + *
+   * consensus states and their heights associated with the client
+   * 
+ * + * repeated .ibc.core.client.v1.ConsensusStateWithHeight consensus_states = 2 [json_name = "consensusStates", (.gogoproto.nullable) = false]; + */ + int getConsensusStatesCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientProto.java new file mode 100644 index 000000000..537f5e362 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public final class ClientProto { + private ClientProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposal.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposal.java new file mode 100644 index 000000000..f2f094450 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposal.java @@ -0,0 +1,760 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * ClientUpdateProposal is a governance proposal. If it passes, the substitute
+ * client's latest consensus state is copied over to the subject client. The proposal
+ * handler may fail if the subject and the substitute do not match in client and
+ * chain parameters (with exception to latest height, frozen height, and chain-id).
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.ClientUpdateProposal} + */ +public final class ClientUpdateProposal extends + com.google.protobuf.GeneratedMessageLite< + ClientUpdateProposal, ClientUpdateProposal.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.ClientUpdateProposal) + ClientUpdateProposalOrBuilder { + private ClientUpdateProposal() { + title_ = ""; + description_ = ""; + subjectClientId_ = ""; + substituteClientId_ = ""; + } + public static final int TITLE_FIELD_NUMBER = 1; + private java.lang.String title_; + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static final int SUBJECT_CLIENT_ID_FIELD_NUMBER = 3; + private java.lang.String subjectClientId_; + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The subjectClientId. + */ + @java.lang.Override + public java.lang.String getSubjectClientId() { + return subjectClientId_; + } + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The bytes for subjectClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(subjectClientId_); + } + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @param value The subjectClientId to set. + */ + private void setSubjectClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + subjectClientId_ = value; + } + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + */ + private void clearSubjectClientId() { + + subjectClientId_ = getDefaultInstance().getSubjectClientId(); + } + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @param value The bytes for subjectClientId to set. + */ + private void setSubjectClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + subjectClientId_ = value.toStringUtf8(); + + } + + public static final int SUBSTITUTE_CLIENT_ID_FIELD_NUMBER = 4; + private java.lang.String substituteClientId_; + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The substituteClientId. + */ + @java.lang.Override + public java.lang.String getSubstituteClientId() { + return substituteClientId_; + } + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The bytes for substituteClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubstituteClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(substituteClientId_); + } + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @param value The substituteClientId to set. + */ + private void setSubstituteClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + substituteClientId_ = value; + } + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + */ + private void clearSubstituteClientId() { + + substituteClientId_ = getDefaultInstance().getSubstituteClientId(); + } + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @param value The bytes for substituteClientId to set. + */ + private void setSubstituteClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + substituteClientId_ = value.toStringUtf8(); + + } + + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ClientUpdateProposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.ClientUpdateProposal prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ClientUpdateProposal is a governance proposal. If it passes, the substitute
+   * client's latest consensus state is copied over to the subject client. The proposal
+   * handler may fail if the subject and the substitute do not match in client and
+   * chain parameters (with exception to latest height, frozen height, and chain-id).
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.ClientUpdateProposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.ClientUpdateProposal, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.ClientUpdateProposal) + com.ibc.core.client.v1.ClientUpdateProposalOrBuilder { + // Construct using com.ibc.core.client.v1.ClientUpdateProposal.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * the title of the update proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + *
+     * the title of the update proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + *
+     * the title of the update proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + *
+     * the title of the update proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + *
+     * the title of the update proposal
+     * 
+ * + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + *
+     * the description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + *
+     * the description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + *
+     * the description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + *
+     * the description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + *
+     * the description of the proposal
+     * 
+ * + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + /** + *
+     * the client identifier for the client to be updated if the proposal passes
+     * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The subjectClientId. + */ + @java.lang.Override + public java.lang.String getSubjectClientId() { + return instance.getSubjectClientId(); + } + /** + *
+     * the client identifier for the client to be updated if the proposal passes
+     * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The bytes for subjectClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubjectClientIdBytes() { + return instance.getSubjectClientIdBytes(); + } + /** + *
+     * the client identifier for the client to be updated if the proposal passes
+     * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @param value The subjectClientId to set. + * @return This builder for chaining. + */ + public Builder setSubjectClientId( + java.lang.String value) { + copyOnWrite(); + instance.setSubjectClientId(value); + return this; + } + /** + *
+     * the client identifier for the client to be updated if the proposal passes
+     * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return This builder for chaining. + */ + public Builder clearSubjectClientId() { + copyOnWrite(); + instance.clearSubjectClientId(); + return this; + } + /** + *
+     * the client identifier for the client to be updated if the proposal passes
+     * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @param value The bytes for subjectClientId to set. + * @return This builder for chaining. + */ + public Builder setSubjectClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSubjectClientIdBytes(value); + return this; + } + + /** + *
+     * the substitute client identifier for the client standing in for the subject
+     * client
+     * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The substituteClientId. + */ + @java.lang.Override + public java.lang.String getSubstituteClientId() { + return instance.getSubstituteClientId(); + } + /** + *
+     * the substitute client identifier for the client standing in for the subject
+     * client
+     * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The bytes for substituteClientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSubstituteClientIdBytes() { + return instance.getSubstituteClientIdBytes(); + } + /** + *
+     * the substitute client identifier for the client standing in for the subject
+     * client
+     * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @param value The substituteClientId to set. + * @return This builder for chaining. + */ + public Builder setSubstituteClientId( + java.lang.String value) { + copyOnWrite(); + instance.setSubstituteClientId(value); + return this; + } + /** + *
+     * the substitute client identifier for the client standing in for the subject
+     * client
+     * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return This builder for chaining. + */ + public Builder clearSubstituteClientId() { + copyOnWrite(); + instance.clearSubstituteClientId(); + return this; + } + /** + *
+     * the substitute client identifier for the client standing in for the subject
+     * client
+     * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @param value The bytes for substituteClientId to set. + * @return This builder for chaining. + */ + public Builder setSubstituteClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSubstituteClientIdBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.ClientUpdateProposal) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.ClientUpdateProposal(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "title_", + "description_", + "subjectClientId_", + "substituteClientId_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\u0208\u0004\u0208"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.ClientUpdateProposal.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.ClientUpdateProposal) + private static final com.ibc.core.client.v1.ClientUpdateProposal DEFAULT_INSTANCE; + static { + ClientUpdateProposal defaultInstance = new ClientUpdateProposal(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ClientUpdateProposal.class, defaultInstance); + } + + public static com.ibc.core.client.v1.ClientUpdateProposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposalOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposalOrBuilder.java new file mode 100644 index 000000000..3ce3c304a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ClientUpdateProposalOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface ClientUpdateProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.ClientUpdateProposal) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + *
+   * the title of the update proposal
+   * 
+ * + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + *
+   * the description of the proposal
+   * 
+ * + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The subjectClientId. + */ + java.lang.String getSubjectClientId(); + /** + *
+   * the client identifier for the client to be updated if the proposal passes
+   * 
+ * + * string subject_client_id = 3 [json_name = "subjectClientId"]; + * @return The bytes for subjectClientId. + */ + com.google.protobuf.ByteString + getSubjectClientIdBytes(); + + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The substituteClientId. + */ + java.lang.String getSubstituteClientId(); + /** + *
+   * the substitute client identifier for the client standing in for the subject
+   * client
+   * 
+ * + * string substitute_client_id = 4 [json_name = "substituteClientId"]; + * @return The bytes for substituteClientId. + */ + com.google.protobuf.ByteString + getSubstituteClientIdBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeight.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeight.java new file mode 100644 index 000000000..d626811e2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeight.java @@ -0,0 +1,469 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * ConsensusStateWithHeight defines a consensus state with an additional height
+ * field.
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.ConsensusStateWithHeight} + */ +public final class ConsensusStateWithHeight extends + com.google.protobuf.GeneratedMessageLite< + ConsensusStateWithHeight, ConsensusStateWithHeight.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.ConsensusStateWithHeight) + ConsensusStateWithHeightOrBuilder { + private ConsensusStateWithHeight() { + } + public static final int HEIGHT_FIELD_NUMBER = 1; + private com.ibc.core.client.v1.Height height_; + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasHeight() { + return height_ != null; + } + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getHeight() { + return height_ == null ? com.ibc.core.client.v1.Height.getDefaultInstance() : height_; + } + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + private void setHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + height_ = value; + + } + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + if (height_ != null && + height_ != com.ibc.core.client.v1.Height.getDefaultInstance()) { + height_ = + com.ibc.core.client.v1.Height.newBuilder(height_).mergeFrom(value).buildPartial(); + } else { + height_ = value; + } + + } + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + private void clearHeight() { height_ = null; + + } + + public static final int CONSENSUS_STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Any consensusState_; + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + @java.lang.Override + public boolean hasConsensusState() { + return consensusState_ != null; + } + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getConsensusState() { + return consensusState_ == null ? com.google.protobuf.Any.getDefaultInstance() : consensusState_; + } + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + private void setConsensusState(com.google.protobuf.Any value) { + value.getClass(); + consensusState_ = value; + + } + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeConsensusState(com.google.protobuf.Any value) { + value.getClass(); + if (consensusState_ != null && + consensusState_ != com.google.protobuf.Any.getDefaultInstance()) { + consensusState_ = + com.google.protobuf.Any.newBuilder(consensusState_).mergeFrom(value).buildPartial(); + } else { + consensusState_ = value; + } + + } + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + private void clearConsensusState() { consensusState_ = null; + + } + + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.ConsensusStateWithHeight parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.ConsensusStateWithHeight prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ConsensusStateWithHeight defines a consensus state with an additional height
+   * field.
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.ConsensusStateWithHeight} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.ConsensusStateWithHeight, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.ConsensusStateWithHeight) + com.ibc.core.client.v1.ConsensusStateWithHeightOrBuilder { + // Construct using com.ibc.core.client.v1.ConsensusStateWithHeight.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasHeight() { + return instance.hasHeight(); + } + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getHeight() { + return instance.getHeight(); + } + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + public Builder setHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + public Builder setHeight( + com.ibc.core.client.v1.Height.Builder builderForValue) { + copyOnWrite(); + instance.setHeight(builderForValue.build()); + return this; + } + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + public Builder mergeHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.mergeHeight(value); + return this; + } + /** + *
+     * consensus state height
+     * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + */ + public Builder clearHeight() { copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + @java.lang.Override + public boolean hasConsensusState() { + return instance.hasConsensusState(); + } + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getConsensusState() { + return instance.getConsensusState(); + } + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + public Builder setConsensusState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.setConsensusState(value); + return this; + } + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + public Builder setConsensusState( + com.google.protobuf.Any.Builder builderForValue) { + copyOnWrite(); + instance.setConsensusState(builderForValue.build()); + return this; + } + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + public Builder mergeConsensusState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.mergeConsensusState(value); + return this; + } + /** + *
+     * consensus state
+     * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + */ + public Builder clearConsensusState() { copyOnWrite(); + instance.clearConsensusState(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.ConsensusStateWithHeight) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.ConsensusStateWithHeight(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "height_", + "consensusState_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.ConsensusStateWithHeight.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.ConsensusStateWithHeight) + private static final com.ibc.core.client.v1.ConsensusStateWithHeight DEFAULT_INSTANCE; + static { + ConsensusStateWithHeight defaultInstance = new ConsensusStateWithHeight(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ConsensusStateWithHeight.class, defaultInstance); + } + + public static com.ibc.core.client.v1.ConsensusStateWithHeight getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeightOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeightOrBuilder.java new file mode 100644 index 000000000..3050feb2b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ConsensusStateWithHeightOrBuilder.java @@ -0,0 +1,47 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface ConsensusStateWithHeightOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.ConsensusStateWithHeight) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + * @return Whether the height field is set. + */ + boolean hasHeight(); + /** + *
+   * consensus state height
+   * 
+ * + * .ibc.core.client.v1.Height height = 1 [json_name = "height", (.gogoproto.nullable) = false]; + * @return The height. + */ + com.ibc.core.client.v1.Height getHeight(); + + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + * @return Whether the consensusState field is set. + */ + boolean hasConsensusState(); + /** + *
+   * consensus state
+   * 
+ * + * .google.protobuf.Any consensus_state = 2 [json_name = "consensusState"]; + * @return The consensusState. + */ + com.google.protobuf.Any getConsensusState(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Height.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Height.java new file mode 100644 index 000000000..2ff5f714d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Height.java @@ -0,0 +1,366 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * Height is a monotonically increasing data type
+ * that can be compared against another Height for the purposes of updating and
+ * freezing clients
+ * Normally the RevisionHeight is incremented at each height while keeping
+ * RevisionNumber the same. However some consensus algorithms may choose to
+ * reset the height in certain conditions e.g. hard forks, state-machine
+ * breaking changes In these cases, the RevisionNumber is incremented so that
+ * height continues to be monitonically increasing even as the RevisionHeight
+ * gets reset
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.Height} + */ +public final class Height extends + com.google.protobuf.GeneratedMessageLite< + Height, Height.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.Height) + HeightOrBuilder { + private Height() { + } + public static final int REVISION_NUMBER_FIELD_NUMBER = 1; + private long revisionNumber_; + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + @java.lang.Override + public long getRevisionNumber() { + return revisionNumber_; + } + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @param value The revisionNumber to set. + */ + private void setRevisionNumber(long value) { + + revisionNumber_ = value; + } + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + */ + private void clearRevisionNumber() { + + revisionNumber_ = 0L; + } + + public static final int REVISION_HEIGHT_FIELD_NUMBER = 2; + private long revisionHeight_; + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + @java.lang.Override + public long getRevisionHeight() { + return revisionHeight_; + } + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @param value The revisionHeight to set. + */ + private void setRevisionHeight(long value) { + + revisionHeight_ = value; + } + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + */ + private void clearRevisionHeight() { + + revisionHeight_ = 0L; + } + + public static com.ibc.core.client.v1.Height parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Height parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Height parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Height parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Height parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Height parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Height parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Height parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.Height parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Height parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.Height parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Height parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.Height prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Height is a monotonically increasing data type
+   * that can be compared against another Height for the purposes of updating and
+   * freezing clients
+   * Normally the RevisionHeight is incremented at each height while keeping
+   * RevisionNumber the same. However some consensus algorithms may choose to
+   * reset the height in certain conditions e.g. hard forks, state-machine
+   * breaking changes In these cases, the RevisionNumber is incremented so that
+   * height continues to be monitonically increasing even as the RevisionHeight
+   * gets reset
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.Height} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.Height, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.Height) + com.ibc.core.client.v1.HeightOrBuilder { + // Construct using com.ibc.core.client.v1.Height.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + @java.lang.Override + public long getRevisionNumber() { + return instance.getRevisionNumber(); + } + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @param value The revisionNumber to set. + * @return This builder for chaining. + */ + public Builder setRevisionNumber(long value) { + copyOnWrite(); + instance.setRevisionNumber(value); + return this; + } + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return This builder for chaining. + */ + public Builder clearRevisionNumber() { + copyOnWrite(); + instance.clearRevisionNumber(); + return this; + } + + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + @java.lang.Override + public long getRevisionHeight() { + return instance.getRevisionHeight(); + } + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @param value The revisionHeight to set. + * @return This builder for chaining. + */ + public Builder setRevisionHeight(long value) { + copyOnWrite(); + instance.setRevisionHeight(value); + return this; + } + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return This builder for chaining. + */ + public Builder clearRevisionHeight() { + copyOnWrite(); + instance.clearRevisionHeight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.Height) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.Height(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "revisionNumber_", + "revisionHeight_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.Height.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.Height) + private static final com.ibc.core.client.v1.Height DEFAULT_INSTANCE; + static { + Height defaultInstance = new Height(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Height.class, defaultInstance); + } + + public static com.ibc.core.client.v1.Height getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/HeightOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/HeightOrBuilder.java new file mode 100644 index 000000000..eea1b73f6 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/HeightOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface HeightOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.Height) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + long getRevisionNumber(); + + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + long getRevisionHeight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientState.java new file mode 100644 index 000000000..af49c3988 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientState.java @@ -0,0 +1,470 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * IdentifiedClientState defines a client state with an additional client
+ * identifier field.
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.IdentifiedClientState} + */ +public final class IdentifiedClientState extends + com.google.protobuf.GeneratedMessageLite< + IdentifiedClientState, IdentifiedClientState.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.IdentifiedClientState) + IdentifiedClientStateOrBuilder { + private IdentifiedClientState() { + clientId_ = ""; + } + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return clientId_; + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int CLIENT_STATE_FIELD_NUMBER = 2; + private com.google.protobuf.Any clientState_; + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + @java.lang.Override + public boolean hasClientState() { + return clientState_ != null; + } + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getClientState() { + return clientState_ == null ? com.google.protobuf.Any.getDefaultInstance() : clientState_; + } + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + private void setClientState(com.google.protobuf.Any value) { + value.getClass(); + clientState_ = value; + + } + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeClientState(com.google.protobuf.Any value) { + value.getClass(); + if (clientState_ != null && + clientState_ != com.google.protobuf.Any.getDefaultInstance()) { + clientState_ = + com.google.protobuf.Any.newBuilder(clientState_).mergeFrom(value).buildPartial(); + } else { + clientState_ = value; + } + + } + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + private void clearClientState() { clientState_ = null; + + } + + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.IdentifiedClientState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.IdentifiedClientState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * IdentifiedClientState defines a client state with an additional client
+   * identifier field.
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.IdentifiedClientState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.IdentifiedClientState, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.IdentifiedClientState) + com.ibc.core.client.v1.IdentifiedClientStateOrBuilder { + // Construct using com.ibc.core.client.v1.IdentifiedClientState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return This builder for chaining. + */ + public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + *
+     * client identifier
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + @java.lang.Override + public boolean hasClientState() { + return instance.hasClientState(); + } + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getClientState() { + return instance.getClientState(); + } + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + public Builder setClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.setClientState(value); + return this; + } + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + public Builder setClientState( + com.google.protobuf.Any.Builder builderForValue) { + copyOnWrite(); + instance.setClientState(builderForValue.build()); + return this; + } + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + public Builder mergeClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.mergeClientState(value); + return this; + } + /** + *
+     * client state
+     * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + */ + public Builder clearClientState() { copyOnWrite(); + instance.clearClientState(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.IdentifiedClientState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.IdentifiedClientState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "clientState_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\t" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.IdentifiedClientState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.IdentifiedClientState) + private static final com.ibc.core.client.v1.IdentifiedClientState DEFAULT_INSTANCE; + static { + IdentifiedClientState defaultInstance = new IdentifiedClientState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + IdentifiedClientState.class, defaultInstance); + } + + public static com.ibc.core.client.v1.IdentifiedClientState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientStateOrBuilder.java new file mode 100644 index 000000000..2c71848c4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/IdentifiedClientStateOrBuilder.java @@ -0,0 +1,48 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface IdentifiedClientStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.IdentifiedClientState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + java.lang.String getClientId(); + /** + *
+   * client identifier
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + * @return Whether the clientState field is set. + */ + boolean hasClientState(); + /** + *
+   * client state
+   * 
+ * + * .google.protobuf.Any client_state = 2 [json_name = "clientState"]; + * @return The clientState. + */ + com.google.protobuf.Any getClientState(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Params.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Params.java new file mode 100644 index 000000000..d3958203d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/Params.java @@ -0,0 +1,486 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * Params defines the set of IBC light client parameters.
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.Params} + */ +public final class Params extends + com.google.protobuf.GeneratedMessageLite< + Params, Params.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.Params) + ParamsOrBuilder { + private Params() { + allowedClients_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + public static final int ALLOWED_CLIENTS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList allowedClients_; + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return A list containing the allowedClients. + */ + @java.lang.Override + public java.util.List getAllowedClientsList() { + return allowedClients_; + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return The count of allowedClients. + */ + @java.lang.Override + public int getAllowedClientsCount() { + return allowedClients_.size(); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the element to return. + * @return The allowedClients at the given index. + */ + @java.lang.Override + public java.lang.String getAllowedClients(int index) { + return allowedClients_.get(index); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the value to return. + * @return The bytes of the allowedClients at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAllowedClientsBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + allowedClients_.get(index)); + } + private void ensureAllowedClientsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + allowedClients_; if (!tmp.isModifiable()) { + allowedClients_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index to set the value at. + * @param value The allowedClients to set. + */ + private void setAllowedClients( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureAllowedClientsIsMutable(); + allowedClients_.set(index, value); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param value The allowedClients to add. + */ + private void addAllowedClients( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureAllowedClientsIsMutable(); + allowedClients_.add(value); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param values The allowedClients to add. + */ + private void addAllAllowedClients( + java.lang.Iterable values) { + ensureAllowedClientsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, allowedClients_); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + */ + private void clearAllowedClients() { + allowedClients_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param value The bytes of the allowedClients to add. + */ + private void addAllowedClientsBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureAllowedClientsIsMutable(); + allowedClients_.add(value.toStringUtf8()); + } + + public static com.ibc.core.client.v1.Params parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Params parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Params parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Params parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Params parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.Params parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.Params parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Params parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.Params parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Params parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.Params parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.Params parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.Params prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Params defines the set of IBC light client parameters.
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.Params} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.Params, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.Params) + com.ibc.core.client.v1.ParamsOrBuilder { + // Construct using com.ibc.core.client.v1.Params.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return A list containing the allowedClients. + */ + @java.lang.Override + public java.util.List + getAllowedClientsList() { + return java.util.Collections.unmodifiableList( + instance.getAllowedClientsList()); + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return The count of allowedClients. + */ + @java.lang.Override + public int getAllowedClientsCount() { + return instance.getAllowedClientsCount(); + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the element to return. + * @return The allowedClients at the given index. + */ + @java.lang.Override + public java.lang.String getAllowedClients(int index) { + return instance.getAllowedClients(index); + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the value to return. + * @return The bytes of the allowedClients at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAllowedClientsBytes(int index) { + return instance.getAllowedClientsBytes(index); + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index to set the value at. + * @param value The allowedClients to set. + * @return This builder for chaining. + */ + public Builder setAllowedClients( + int index, java.lang.String value) { + copyOnWrite(); + instance.setAllowedClients(index, value); + return this; + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param value The allowedClients to add. + * @return This builder for chaining. + */ + public Builder addAllowedClients( + java.lang.String value) { + copyOnWrite(); + instance.addAllowedClients(value); + return this; + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param values The allowedClients to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedClients( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllAllowedClients(values); + return this; + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return This builder for chaining. + */ + public Builder clearAllowedClients() { + copyOnWrite(); + instance.clearAllowedClients(); + return this; + } + /** + *
+     * allowed_clients defines the list of allowed client state types which can be created
+     * and interacted with. If a client type is removed from the allowed clients list, usage
+     * of this client will be disabled until it is added again to the list.
+     * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param value The bytes of the allowedClients to add. + * @return This builder for chaining. + */ + public Builder addAllowedClientsBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addAllowedClientsBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.Params) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.Params(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "allowedClients_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u021a"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.Params.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.Params) + private static final com.ibc.core.client.v1.Params DEFAULT_INSTANCE; + static { + Params defaultInstance = new Params(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Params.class, defaultInstance); + } + + public static com.ibc.core.client.v1.Params getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ParamsOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ParamsOrBuilder.java new file mode 100644 index 000000000..e5e56a30e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/ParamsOrBuilder.java @@ -0,0 +1,58 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface ParamsOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.Params) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return A list containing the allowedClients. + */ + java.util.List + getAllowedClientsList(); + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @return The count of allowedClients. + */ + int getAllowedClientsCount(); + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the element to return. + * @return The allowedClients at the given index. + */ + java.lang.String getAllowedClients(int index); + /** + *
+   * allowed_clients defines the list of allowed client state types which can be created
+   * and interacted with. If a client type is removed from the allowed clients list, usage
+   * of this client will be disabled until it is added again to the list.
+   * 
+ * + * repeated string allowed_clients = 1 [json_name = "allowedClients"]; + * @param index The index of the element to return. + * @return The allowedClients at the given index. + */ + com.google.protobuf.ByteString + getAllowedClientsBytes(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposal.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposal.java new file mode 100644 index 000000000..03cba59e0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposal.java @@ -0,0 +1,677 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +/** + *
+ * UpgradeProposal is a gov Content type for initiating an IBC breaking
+ * upgrade.
+ * 
+ * + * Protobuf type {@code ibc.core.client.v1.UpgradeProposal} + */ +public final class UpgradeProposal extends + com.google.protobuf.GeneratedMessageLite< + UpgradeProposal, UpgradeProposal.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.client.v1.UpgradeProposal) + UpgradeProposalOrBuilder { + private UpgradeProposal() { + title_ = ""; + description_ = ""; + } + public static final int TITLE_FIELD_NUMBER = 1; + private java.lang.String title_; + /** + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return title_; + } + /** + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(title_); + } + /** + * string title = 1 [json_name = "title"]; + * @param value The title to set. + */ + private void setTitle( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + title_ = value; + } + /** + * string title = 1 [json_name = "title"]; + */ + private void clearTitle() { + + title_ = getDefaultInstance().getTitle(); + } + /** + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + */ + private void setTitleBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + title_ = value.toStringUtf8(); + + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private java.lang.String description_; + /** + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return description_; + } + /** + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(description_); + } + /** + * string description = 2 [json_name = "description"]; + * @param value The description to set. + */ + private void setDescription( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + description_ = value; + } + /** + * string description = 2 [json_name = "description"]; + */ + private void clearDescription() { + + description_ = getDefaultInstance().getDescription(); + } + /** + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + */ + private void setDescriptionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + description_ = value.toStringUtf8(); + + } + + public static final int PLAN_FIELD_NUMBER = 3; + private com.cosmos.upgrade.v1beta1.Plan plan_; + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPlan() { + return plan_ != null; + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.cosmos.upgrade.v1beta1.Plan getPlan() { + return plan_ == null ? com.cosmos.upgrade.v1beta1.Plan.getDefaultInstance() : plan_; + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + private void setPlan(com.cosmos.upgrade.v1beta1.Plan value) { + value.getClass(); + plan_ = value; + + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePlan(com.cosmos.upgrade.v1beta1.Plan value) { + value.getClass(); + if (plan_ != null && + plan_ != com.cosmos.upgrade.v1beta1.Plan.getDefaultInstance()) { + plan_ = + com.cosmos.upgrade.v1beta1.Plan.newBuilder(plan_).mergeFrom(value).buildPartial(); + } else { + plan_ = value; + } + + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + private void clearPlan() { plan_ = null; + + } + + public static final int UPGRADED_CLIENT_STATE_FIELD_NUMBER = 4; + private com.google.protobuf.Any upgradedClientState_; + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + @java.lang.Override + public boolean hasUpgradedClientState() { + return upgradedClientState_ != null; + } + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getUpgradedClientState() { + return upgradedClientState_ == null ? com.google.protobuf.Any.getDefaultInstance() : upgradedClientState_; + } + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + private void setUpgradedClientState(com.google.protobuf.Any value) { + value.getClass(); + upgradedClientState_ = value; + + } + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeUpgradedClientState(com.google.protobuf.Any value) { + value.getClass(); + if (upgradedClientState_ != null && + upgradedClientState_ != com.google.protobuf.Any.getDefaultInstance()) { + upgradedClientState_ = + com.google.protobuf.Any.newBuilder(upgradedClientState_).mergeFrom(value).buildPartial(); + } else { + upgradedClientState_ = value; + } + + } + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + private void clearUpgradedClientState() { upgradedClientState_ = null; + + } + + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.UpgradeProposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.UpgradeProposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.client.v1.UpgradeProposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.client.v1.UpgradeProposal prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * UpgradeProposal is a gov Content type for initiating an IBC breaking
+   * upgrade.
+   * 
+ * + * Protobuf type {@code ibc.core.client.v1.UpgradeProposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.client.v1.UpgradeProposal, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.client.v1.UpgradeProposal) + com.ibc.core.client.v1.UpgradeProposalOrBuilder { + // Construct using com.ibc.core.client.v1.UpgradeProposal.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string title = 1 [json_name = "title"]; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + return instance.getTitle(); + } + /** + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + return instance.getTitleBytes(); + } + /** + * string title = 1 [json_name = "title"]; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + copyOnWrite(); + instance.setTitle(value); + return this; + } + /** + * string title = 1 [json_name = "title"]; + * @return This builder for chaining. + */ + public Builder clearTitle() { + copyOnWrite(); + instance.clearTitle(); + return this; + } + /** + * string title = 1 [json_name = "title"]; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTitleBytes(value); + return this; + } + + /** + * string description = 2 [json_name = "description"]; + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + return instance.getDescription(); + } + /** + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDescriptionBytes() { + return instance.getDescriptionBytes(); + } + /** + * string description = 2 [json_name = "description"]; + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription( + java.lang.String value) { + copyOnWrite(); + instance.setDescription(value); + return this; + } + /** + * string description = 2 [json_name = "description"]; + * @return This builder for chaining. + */ + public Builder clearDescription() { + copyOnWrite(); + instance.clearDescription(); + return this; + } + /** + * string description = 2 [json_name = "description"]; + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDescriptionBytes(value); + return this; + } + + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPlan() { + return instance.hasPlan(); + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.cosmos.upgrade.v1beta1.Plan getPlan() { + return instance.getPlan(); + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + public Builder setPlan(com.cosmos.upgrade.v1beta1.Plan value) { + copyOnWrite(); + instance.setPlan(value); + return this; + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + public Builder setPlan( + com.cosmos.upgrade.v1beta1.Plan.Builder builderForValue) { + copyOnWrite(); + instance.setPlan(builderForValue.build()); + return this; + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + public Builder mergePlan(com.cosmos.upgrade.v1beta1.Plan value) { + copyOnWrite(); + instance.mergePlan(value); + return this; + } + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + */ + public Builder clearPlan() { copyOnWrite(); + instance.clearPlan(); + return this; + } + + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + @java.lang.Override + public boolean hasUpgradedClientState() { + return instance.hasUpgradedClientState(); + } + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + @java.lang.Override + public com.google.protobuf.Any getUpgradedClientState() { + return instance.getUpgradedClientState(); + } + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + public Builder setUpgradedClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.setUpgradedClientState(value); + return this; + } + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + public Builder setUpgradedClientState( + com.google.protobuf.Any.Builder builderForValue) { + copyOnWrite(); + instance.setUpgradedClientState(builderForValue.build()); + return this; + } + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + public Builder mergeUpgradedClientState(com.google.protobuf.Any value) { + copyOnWrite(); + instance.mergeUpgradedClientState(value); + return this; + } + /** + *
+     * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+     * This will make the chain commit to the correct upgraded (self) client state
+     * before the upgrade occurs, so that connecting chains can verify that the
+     * new upgraded client is valid by verifying a proof on the previous version
+     * of the chain. This will allow IBC connections to persist smoothly across
+     * planned chain upgrades
+     * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + */ + public Builder clearUpgradedClientState() { copyOnWrite(); + instance.clearUpgradedClientState(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.client.v1.UpgradeProposal) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.client.v1.UpgradeProposal(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "title_", + "description_", + "plan_", + "upgradedClientState_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\t\u0004\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.client.v1.UpgradeProposal.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.client.v1.UpgradeProposal) + private static final com.ibc.core.client.v1.UpgradeProposal DEFAULT_INSTANCE; + static { + UpgradeProposal defaultInstance = new UpgradeProposal(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + UpgradeProposal.class, defaultInstance); + } + + public static com.ibc.core.client.v1.UpgradeProposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposalOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposalOrBuilder.java new file mode 100644 index 000000000..37092b152 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/client/v1/UpgradeProposalOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/client/v1/client.proto + +package com.ibc.core.client.v1; + +public interface UpgradeProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.client.v1.UpgradeProposal) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string title = 1 [json_name = "title"]; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 1 [json_name = "title"]; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * string description = 2 [json_name = "description"]; + * @return The description. + */ + java.lang.String getDescription(); + /** + * string description = 2 [json_name = "description"]; + * @return The bytes for description. + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + * @return Whether the plan field is set. + */ + boolean hasPlan(); + /** + * .cosmos.upgrade.v1beta1.Plan plan = 3 [json_name = "plan", (.gogoproto.nullable) = false]; + * @return The plan. + */ + com.cosmos.upgrade.v1beta1.Plan getPlan(); + + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + * @return Whether the upgradedClientState field is set. + */ + boolean hasUpgradedClientState(); + /** + *
+   * An UpgradedClientState must be provided to perform an IBC breaking upgrade.
+   * This will make the chain commit to the correct upgraded (self) client state
+   * before the upgrade occurs, so that connecting chains can verify that the
+   * new upgraded client is valid by verifying a proof on the previous version
+   * of the chain. This will allow IBC connections to persist smoothly across
+   * planned chain upgrades
+   * 
+ * + * .google.protobuf.Any upgraded_client_state = 4 [json_name = "upgradedClientState"]; + * @return The upgradedClientState. + */ + com.google.protobuf.Any getUpgradedClientState(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/CommitmentProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/CommitmentProto.java new file mode 100644 index 000000000..7ea33cb8d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/CommitmentProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +public final class CommitmentProto { + private CommitmentProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePath.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePath.java new file mode 100644 index 000000000..9df1cabd2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePath.java @@ -0,0 +1,382 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +/** + *
+ * MerklePath is the path used to verify commitment proofs, which can be an
+ * arbitrary structured object (defined by a commitment type).
+ * MerklePath is represented from root-to-leaf
+ * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerklePath} + */ +public final class MerklePath extends + com.google.protobuf.GeneratedMessageLite< + MerklePath, MerklePath.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.commitment.v1.MerklePath) + MerklePathOrBuilder { + private MerklePath() { + keyPath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + public static final int KEY_PATH_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList keyPath_; + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + @java.lang.Override + public java.util.List getKeyPathList() { + return keyPath_; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + @java.lang.Override + public int getKeyPathCount() { + return keyPath_.size(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + @java.lang.Override + public java.lang.String getKeyPath(int index) { + return keyPath_.get(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the value to return. + * @return The bytes of the keyPath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyPathBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + keyPath_.get(index)); + } + private void ensureKeyPathIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + keyPath_; if (!tmp.isModifiable()) { + keyPath_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index to set the value at. + * @param value The keyPath to set. + */ + private void setKeyPath( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureKeyPathIsMutable(); + keyPath_.set(index, value); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The keyPath to add. + */ + private void addKeyPath( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureKeyPathIsMutable(); + keyPath_.add(value); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param values The keyPath to add. + */ + private void addAllKeyPath( + java.lang.Iterable values) { + ensureKeyPathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, keyPath_); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + */ + private void clearKeyPath() { + keyPath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The bytes of the keyPath to add. + */ + private void addKeyPathBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureKeyPathIsMutable(); + keyPath_.add(value.toStringUtf8()); + } + + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePath parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePath parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePath parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.commitment.v1.MerklePath prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerklePath is the path used to verify commitment proofs, which can be an
+   * arbitrary structured object (defined by a commitment type).
+   * MerklePath is represented from root-to-leaf
+   * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerklePath} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.commitment.v1.MerklePath, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.commitment.v1.MerklePath) + com.ibc.core.commitment.v1.MerklePathOrBuilder { + // Construct using com.ibc.core.commitment.v1.MerklePath.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + @java.lang.Override + public java.util.List + getKeyPathList() { + return java.util.Collections.unmodifiableList( + instance.getKeyPathList()); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + @java.lang.Override + public int getKeyPathCount() { + return instance.getKeyPathCount(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + @java.lang.Override + public java.lang.String getKeyPath(int index) { + return instance.getKeyPath(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the value to return. + * @return The bytes of the keyPath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyPathBytes(int index) { + return instance.getKeyPathBytes(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index to set the value at. + * @param value The keyPath to set. + * @return This builder for chaining. + */ + public Builder setKeyPath( + int index, java.lang.String value) { + copyOnWrite(); + instance.setKeyPath(index, value); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The keyPath to add. + * @return This builder for chaining. + */ + public Builder addKeyPath( + java.lang.String value) { + copyOnWrite(); + instance.addKeyPath(value); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param values The keyPath to add. + * @return This builder for chaining. + */ + public Builder addAllKeyPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllKeyPath(values); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return This builder for chaining. + */ + public Builder clearKeyPath() { + copyOnWrite(); + instance.clearKeyPath(); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The bytes of the keyPath to add. + * @return This builder for chaining. + */ + public Builder addKeyPathBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addKeyPathBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.commitment.v1.MerklePath) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.commitment.v1.MerklePath(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "keyPath_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u021a"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.commitment.v1.MerklePath.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.commitment.v1.MerklePath) + private static final com.ibc.core.commitment.v1.MerklePath DEFAULT_INSTANCE; + static { + MerklePath defaultInstance = new MerklePath(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerklePath.class, defaultInstance); + } + + public static com.ibc.core.commitment.v1.MerklePath getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePathOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePathOrBuilder.java new file mode 100644 index 000000000..c2447ee02 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePathOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +public interface MerklePathOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.commitment.v1.MerklePath) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + java.util.List + getKeyPathList(); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + int getKeyPathCount(); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + java.lang.String getKeyPath(int index); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + com.google.protobuf.ByteString + getKeyPathBytes(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefix.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefix.java new file mode 100644 index 000000000..31659034d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefix.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +/** + *
+ * MerklePrefix is merkle path prefixed to the key.
+ * The constructed key from the Path and the key will be append(Path.KeyPath,
+ * append(Path.KeyPrefix, key...))
+ * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerklePrefix} + */ +public final class MerklePrefix extends + com.google.protobuf.GeneratedMessageLite< + MerklePrefix, MerklePrefix.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.commitment.v1.MerklePrefix) + MerklePrefixOrBuilder { + private MerklePrefix() { + keyPrefix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_PREFIX_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString keyPrefix_; + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPrefix() { + return keyPrefix_; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @param value The keyPrefix to set. + */ + private void setKeyPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + keyPrefix_ = value; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + */ + private void clearKeyPrefix() { + + keyPrefix_ = getDefaultInstance().getKeyPrefix(); + } + + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerklePrefix parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.commitment.v1.MerklePrefix prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerklePrefix is merkle path prefixed to the key.
+   * The constructed key from the Path and the key will be append(Path.KeyPath,
+   * append(Path.KeyPrefix, key...))
+   * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerklePrefix} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.commitment.v1.MerklePrefix, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.commitment.v1.MerklePrefix) + com.ibc.core.commitment.v1.MerklePrefixOrBuilder { + // Construct using com.ibc.core.commitment.v1.MerklePrefix.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPrefix() { + return instance.getKeyPrefix(); + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @param value The keyPrefix to set. + * @return This builder for chaining. + */ + public Builder setKeyPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKeyPrefix(value); + return this; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return This builder for chaining. + */ + public Builder clearKeyPrefix() { + copyOnWrite(); + instance.clearKeyPrefix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.commitment.v1.MerklePrefix) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.commitment.v1.MerklePrefix(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "keyPrefix_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.commitment.v1.MerklePrefix.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.commitment.v1.MerklePrefix) + private static final com.ibc.core.commitment.v1.MerklePrefix DEFAULT_INSTANCE; + static { + MerklePrefix defaultInstance = new MerklePrefix(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerklePrefix.class, defaultInstance); + } + + public static com.ibc.core.commitment.v1.MerklePrefix getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefixOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefixOrBuilder.java new file mode 100644 index 000000000..3046f0a08 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerklePrefixOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +public interface MerklePrefixOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.commitment.v1.MerklePrefix) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + com.google.protobuf.ByteString getKeyPrefix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProof.java new file mode 100644 index 000000000..f2480b876 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProof.java @@ -0,0 +1,398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +/** + *
+ * MerkleProof is a wrapper type over a chain of CommitmentProofs.
+ * It demonstrates membership or non-membership for an element or set of
+ * elements, verifiable in conjunction with a known commitment root. Proofs
+ * should be succinct.
+ * MerkleProofs are ordered from leaf-to-root
+ * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerkleProof} + */ +public final class MerkleProof extends + com.google.protobuf.GeneratedMessageLite< + MerkleProof, MerkleProof.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.commitment.v1.MerkleProof) + MerkleProofOrBuilder { + private MerkleProof() { + proofs_ = emptyProtobufList(); + } + public static final int PROOFS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList proofs_; + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return proofs_; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public java.util.List + getProofsOrBuilderList() { + return proofs_; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return proofs_.size(); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CommitmentProof getProofs(int index) { + return proofs_.get(index); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public com.cosmos.ics23.v1.CommitmentProofOrBuilder getProofsOrBuilder( + int index) { + return proofs_.get(index); + } + private void ensureProofsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = proofs_; + if (!tmp.isModifiable()) { + proofs_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void setProofs( + int index, com.cosmos.ics23.v1.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.set(index, value); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addProofs(com.cosmos.ics23.v1.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(value); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addProofs( + int index, com.cosmos.ics23.v1.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(index, value); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addAllProofs( + java.lang.Iterable values) { + ensureProofsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, proofs_); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void clearProofs() { + proofs_ = emptyProtobufList(); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void removeProofs(int index) { + ensureProofsIsMutable(); + proofs_.remove(index); + } + + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.commitment.v1.MerkleProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerkleProof is a wrapper type over a chain of CommitmentProofs.
+   * It demonstrates membership or non-membership for an element or set of
+   * elements, verifiable in conjunction with a known commitment root. Proofs
+   * should be succinct.
+   * MerkleProofs are ordered from leaf-to-root
+   * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerkleProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.commitment.v1.MerkleProof, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.commitment.v1.MerkleProof) + com.ibc.core.commitment.v1.MerkleProofOrBuilder { + // Construct using com.ibc.core.commitment.v1.MerkleProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return java.util.Collections.unmodifiableList( + instance.getProofsList()); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return instance.getProofsCount(); + }/** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.CommitmentProof getProofs(int index) { + return instance.getProofs(index); + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.cosmos.ics23.v1.CommitmentProof value) { + copyOnWrite(); + instance.setProofs(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.cosmos.ics23.v1.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.setProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs(com.cosmos.ics23.v1.CommitmentProof value) { + copyOnWrite(); + instance.addProofs(value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.cosmos.ics23.v1.CommitmentProof value) { + copyOnWrite(); + instance.addProofs(index, value); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + com.cosmos.ics23.v1.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.cosmos.ics23.v1.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addAllProofs( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllProofs(values); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder clearProofs() { + copyOnWrite(); + instance.clearProofs(); + return this; + } + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder removeProofs(int index) { + copyOnWrite(); + instance.removeProofs(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.commitment.v1.MerkleProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.commitment.v1.MerkleProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proofs_", + com.cosmos.ics23.v1.CommitmentProof.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.commitment.v1.MerkleProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.commitment.v1.MerkleProof) + private static final com.ibc.core.commitment.v1.MerkleProof DEFAULT_INSTANCE; + static { + MerkleProof defaultInstance = new MerkleProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleProof.class, defaultInstance); + } + + public static com.ibc.core.commitment.v1.MerkleProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProofOrBuilder.java new file mode 100644 index 000000000..d457a90ed --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleProofOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +public interface MerkleProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.commitment.v1.MerkleProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + java.util.List + getProofsList(); + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + com.cosmos.ics23.v1.CommitmentProof getProofs(int index); + /** + * repeated .cosmos.ics23.v1.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + int getProofsCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRoot.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRoot.java new file mode 100644 index 000000000..11f73658d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRoot.java @@ -0,0 +1,250 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +/** + *
+ * MerkleRoot defines a merkle root hash.
+ * In the Cosmos SDK, the AppHash of a block header becomes the root.
+ * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerkleRoot} + */ +public final class MerkleRoot extends + com.google.protobuf.GeneratedMessageLite< + MerkleRoot, MerkleRoot.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.core.commitment.v1.MerkleRoot) + MerkleRootOrBuilder { + private MerkleRoot() { + hash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString hash_; + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return hash_; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + hash_ = value; + } + /** + * bytes hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = getDefaultInstance().getHash(); + } + + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.core.commitment.v1.MerkleRoot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.core.commitment.v1.MerkleRoot prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerkleRoot defines a merkle root hash.
+   * In the Cosmos SDK, the AppHash of a block header becomes the root.
+   * 
+ * + * Protobuf type {@code ibc.core.commitment.v1.MerkleRoot} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.core.commitment.v1.MerkleRoot, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.core.commitment.v1.MerkleRoot) + com.ibc.core.commitment.v1.MerkleRootOrBuilder { + // Construct using com.ibc.core.commitment.v1.MerkleRoot.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return instance.getHash(); + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.core.commitment.v1.MerkleRoot) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.core.commitment.v1.MerkleRoot(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.core.commitment.v1.MerkleRoot.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.core.commitment.v1.MerkleRoot) + private static final com.ibc.core.commitment.v1.MerkleRoot DEFAULT_INSTANCE; + static { + MerkleRoot defaultInstance = new MerkleRoot(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleRoot.class, defaultInstance); + } + + public static com.ibc.core.commitment.v1.MerkleRoot getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRootOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRootOrBuilder.java new file mode 100644 index 000000000..ac3bf42b0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/core/commitment/v1/MerkleRootOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ibc/core/commitment/v1/commitment.proto + +package com.ibc.core.commitment.v1; + +public interface MerkleRootOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.core.commitment.v1.MerkleRoot) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.google.protobuf.ByteString getHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientState.java new file mode 100644 index 000000000..ec96d69ec --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientState.java @@ -0,0 +1,1927 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +/** + *
+ * ClientState from Tendermint tracks the current validator set, latest height,
+ * and a possible frozen height.
+ * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.ClientState} + */ +public final class ClientState extends + com.google.protobuf.GeneratedMessageLite< + ClientState, ClientState.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.lightclients.tendermint.v1.ClientState) + ClientStateOrBuilder { + private ClientState() { + chainId_ = ""; + proofSpecs_ = emptyProtobufList(); + upgradePath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + public static final int CHAIN_ID_FIELD_NUMBER = 1; + private java.lang.String chainId_; + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The chainId. + */ + @java.lang.Override + public java.lang.String getChainId() { + return chainId_; + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The bytes for chainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChainIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(chainId_); + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @param value The chainId to set. + */ + private void setChainId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + chainId_ = value; + } + /** + * string chain_id = 1 [json_name = "chainId"]; + */ + private void clearChainId() { + + chainId_ = getDefaultInstance().getChainId(); + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @param value The bytes for chainId to set. + */ + private void setChainIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + chainId_ = value.toStringUtf8(); + + } + + public static final int TRUST_LEVEL_FIELD_NUMBER = 2; + private com.ibc.lightclients.tendermint.v1.Fraction trustLevel_; + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasTrustLevel() { + return trustLevel_ != null; + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Fraction getTrustLevel() { + return trustLevel_ == null ? com.ibc.lightclients.tendermint.v1.Fraction.getDefaultInstance() : trustLevel_; + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + private void setTrustLevel(com.ibc.lightclients.tendermint.v1.Fraction value) { + value.getClass(); + trustLevel_ = value; + + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTrustLevel(com.ibc.lightclients.tendermint.v1.Fraction value) { + value.getClass(); + if (trustLevel_ != null && + trustLevel_ != com.ibc.lightclients.tendermint.v1.Fraction.getDefaultInstance()) { + trustLevel_ = + com.ibc.lightclients.tendermint.v1.Fraction.newBuilder(trustLevel_).mergeFrom(value).buildPartial(); + } else { + trustLevel_ = value; + } + + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + private void clearTrustLevel() { trustLevel_ = null; + + } + + public static final int TRUSTING_PERIOD_FIELD_NUMBER = 3; + private com.google.protobuf.Duration trustingPeriod_; + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasTrustingPeriod() { + return trustingPeriod_ != null; + } + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getTrustingPeriod() { + return trustingPeriod_ == null ? com.google.protobuf.Duration.getDefaultInstance() : trustingPeriod_; + } + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void setTrustingPeriod(com.google.protobuf.Duration value) { + value.getClass(); + trustingPeriod_ = value; + + } + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTrustingPeriod(com.google.protobuf.Duration value) { + value.getClass(); + if (trustingPeriod_ != null && + trustingPeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + trustingPeriod_ = + com.google.protobuf.Duration.newBuilder(trustingPeriod_).mergeFrom(value).buildPartial(); + } else { + trustingPeriod_ = value; + } + + } + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void clearTrustingPeriod() { trustingPeriod_ = null; + + } + + public static final int UNBONDING_PERIOD_FIELD_NUMBER = 4; + private com.google.protobuf.Duration unbondingPeriod_; + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasUnbondingPeriod() { + return unbondingPeriod_ != null; + } + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getUnbondingPeriod() { + return unbondingPeriod_ == null ? com.google.protobuf.Duration.getDefaultInstance() : unbondingPeriod_; + } + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void setUnbondingPeriod(com.google.protobuf.Duration value) { + value.getClass(); + unbondingPeriod_ = value; + + } + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeUnbondingPeriod(com.google.protobuf.Duration value) { + value.getClass(); + if (unbondingPeriod_ != null && + unbondingPeriod_ != com.google.protobuf.Duration.getDefaultInstance()) { + unbondingPeriod_ = + com.google.protobuf.Duration.newBuilder(unbondingPeriod_).mergeFrom(value).buildPartial(); + } else { + unbondingPeriod_ = value; + } + + } + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void clearUnbondingPeriod() { unbondingPeriod_ = null; + + } + + public static final int MAX_CLOCK_DRIFT_FIELD_NUMBER = 5; + private com.google.protobuf.Duration maxClockDrift_; + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasMaxClockDrift() { + return maxClockDrift_ != null; + } + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxClockDrift() { + return maxClockDrift_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxClockDrift_; + } + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void setMaxClockDrift(com.google.protobuf.Duration value) { + value.getClass(); + maxClockDrift_ = value; + + } + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeMaxClockDrift(com.google.protobuf.Duration value) { + value.getClass(); + if (maxClockDrift_ != null && + maxClockDrift_ != com.google.protobuf.Duration.getDefaultInstance()) { + maxClockDrift_ = + com.google.protobuf.Duration.newBuilder(maxClockDrift_).mergeFrom(value).buildPartial(); + } else { + maxClockDrift_ = value; + } + + } + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + private void clearMaxClockDrift() { maxClockDrift_ = null; + + } + + public static final int FROZEN_HEIGHT_FIELD_NUMBER = 6; + private com.ibc.core.client.v1.Height frozenHeight_; + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasFrozenHeight() { + return frozenHeight_ != null; + } + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getFrozenHeight() { + return frozenHeight_ == null ? com.ibc.core.client.v1.Height.getDefaultInstance() : frozenHeight_; + } + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + private void setFrozenHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + frozenHeight_ = value; + + } + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeFrozenHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + if (frozenHeight_ != null && + frozenHeight_ != com.ibc.core.client.v1.Height.getDefaultInstance()) { + frozenHeight_ = + com.ibc.core.client.v1.Height.newBuilder(frozenHeight_).mergeFrom(value).buildPartial(); + } else { + frozenHeight_ = value; + } + + } + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + private void clearFrozenHeight() { frozenHeight_ = null; + + } + + public static final int LATEST_HEIGHT_FIELD_NUMBER = 7; + private com.ibc.core.client.v1.Height latestHeight_; + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasLatestHeight() { + return latestHeight_ != null; + } + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getLatestHeight() { + return latestHeight_ == null ? com.ibc.core.client.v1.Height.getDefaultInstance() : latestHeight_; + } + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + private void setLatestHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + latestHeight_ = value; + + } + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLatestHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + if (latestHeight_ != null && + latestHeight_ != com.ibc.core.client.v1.Height.getDefaultInstance()) { + latestHeight_ = + com.ibc.core.client.v1.Height.newBuilder(latestHeight_).mergeFrom(value).buildPartial(); + } else { + latestHeight_ = value; + } + + } + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + private void clearLatestHeight() { latestHeight_ = null; + + } + + public static final int PROOF_SPECS_FIELD_NUMBER = 8; + private com.google.protobuf.Internal.ProtobufList proofSpecs_; + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public java.util.List getProofSpecsList() { + return proofSpecs_; + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public java.util.List + getProofSpecsOrBuilderList() { + return proofSpecs_; + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public int getProofSpecsCount() { + return proofSpecs_.size(); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ProofSpec getProofSpecs(int index) { + return proofSpecs_.get(index); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public com.cosmos.ics23.v1.ProofSpecOrBuilder getProofSpecsOrBuilder( + int index) { + return proofSpecs_.get(index); + } + private void ensureProofSpecsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = proofSpecs_; + if (!tmp.isModifiable()) { + proofSpecs_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void setProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec value) { + value.getClass(); + ensureProofSpecsIsMutable(); + proofSpecs_.set(index, value); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void addProofSpecs(com.cosmos.ics23.v1.ProofSpec value) { + value.getClass(); + ensureProofSpecsIsMutable(); + proofSpecs_.add(value); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void addProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec value) { + value.getClass(); + ensureProofSpecsIsMutable(); + proofSpecs_.add(index, value); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void addAllProofSpecs( + java.lang.Iterable values) { + ensureProofSpecsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, proofSpecs_); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void clearProofSpecs() { + proofSpecs_ = emptyProtobufList(); + } + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + private void removeProofSpecs(int index) { + ensureProofSpecsIsMutable(); + proofSpecs_.remove(index); + } + + public static final int UPGRADE_PATH_FIELD_NUMBER = 9; + private com.google.protobuf.Internal.ProtobufList upgradePath_; + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return A list containing the upgradePath. + */ + @java.lang.Override + public java.util.List getUpgradePathList() { + return upgradePath_; + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return The count of upgradePath. + */ + @java.lang.Override + public int getUpgradePathCount() { + return upgradePath_.size(); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the element to return. + * @return The upgradePath at the given index. + */ + @java.lang.Override + public java.lang.String getUpgradePath(int index) { + return upgradePath_.get(index); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the value to return. + * @return The bytes of the upgradePath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpgradePathBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + upgradePath_.get(index)); + } + private void ensureUpgradePathIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + upgradePath_; if (!tmp.isModifiable()) { + upgradePath_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index to set the value at. + * @param value The upgradePath to set. + */ + private void setUpgradePath( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureUpgradePathIsMutable(); + upgradePath_.set(index, value); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param value The upgradePath to add. + */ + private void addUpgradePath( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureUpgradePathIsMutable(); + upgradePath_.add(value); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param values The upgradePath to add. + */ + private void addAllUpgradePath( + java.lang.Iterable values) { + ensureUpgradePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, upgradePath_); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + */ + private void clearUpgradePath() { + upgradePath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param value The bytes of the upgradePath to add. + */ + private void addUpgradePathBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureUpgradePathIsMutable(); + upgradePath_.add(value.toStringUtf8()); + } + + public static final int ALLOW_UPDATE_AFTER_EXPIRY_FIELD_NUMBER = 10; + private boolean allowUpdateAfterExpiry_; + /** + *
+   * allow_update_after_expiry is deprecated
+   * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @return The allowUpdateAfterExpiry. + */ + @java.lang.Override + @java.lang.Deprecated public boolean getAllowUpdateAfterExpiry() { + return allowUpdateAfterExpiry_; + } + /** + *
+   * allow_update_after_expiry is deprecated
+   * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @param value The allowUpdateAfterExpiry to set. + */ + private void setAllowUpdateAfterExpiry(boolean value) { + + allowUpdateAfterExpiry_ = value; + } + /** + *
+   * allow_update_after_expiry is deprecated
+   * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + */ + private void clearAllowUpdateAfterExpiry() { + + allowUpdateAfterExpiry_ = false; + } + + public static final int ALLOW_UPDATE_AFTER_MISBEHAVIOUR_FIELD_NUMBER = 11; + private boolean allowUpdateAfterMisbehaviour_; + /** + *
+   * allow_update_after_misbehaviour is deprecated
+   * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @return The allowUpdateAfterMisbehaviour. + */ + @java.lang.Override + @java.lang.Deprecated public boolean getAllowUpdateAfterMisbehaviour() { + return allowUpdateAfterMisbehaviour_; + } + /** + *
+   * allow_update_after_misbehaviour is deprecated
+   * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @param value The allowUpdateAfterMisbehaviour to set. + */ + private void setAllowUpdateAfterMisbehaviour(boolean value) { + + allowUpdateAfterMisbehaviour_ = value; + } + /** + *
+   * allow_update_after_misbehaviour is deprecated
+   * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + */ + private void clearAllowUpdateAfterMisbehaviour() { + + allowUpdateAfterMisbehaviour_ = false; + } + + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ClientState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.lightclients.tendermint.v1.ClientState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ClientState from Tendermint tracks the current validator set, latest height,
+   * and a possible frozen height.
+   * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.ClientState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.lightclients.tendermint.v1.ClientState, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.lightclients.tendermint.v1.ClientState) + com.ibc.lightclients.tendermint.v1.ClientStateOrBuilder { + // Construct using com.ibc.lightclients.tendermint.v1.ClientState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The chainId. + */ + @java.lang.Override + public java.lang.String getChainId() { + return instance.getChainId(); + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The bytes for chainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChainIdBytes() { + return instance.getChainIdBytes(); + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @param value The chainId to set. + * @return This builder for chaining. + */ + public Builder setChainId( + java.lang.String value) { + copyOnWrite(); + instance.setChainId(value); + return this; + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return This builder for chaining. + */ + public Builder clearChainId() { + copyOnWrite(); + instance.clearChainId(); + return this; + } + /** + * string chain_id = 1 [json_name = "chainId"]; + * @param value The bytes for chainId to set. + * @return This builder for chaining. + */ + public Builder setChainIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setChainIdBytes(value); + return this; + } + + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasTrustLevel() { + return instance.hasTrustLevel(); + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Fraction getTrustLevel() { + return instance.getTrustLevel(); + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + public Builder setTrustLevel(com.ibc.lightclients.tendermint.v1.Fraction value) { + copyOnWrite(); + instance.setTrustLevel(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + public Builder setTrustLevel( + com.ibc.lightclients.tendermint.v1.Fraction.Builder builderForValue) { + copyOnWrite(); + instance.setTrustLevel(builderForValue.build()); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + public Builder mergeTrustLevel(com.ibc.lightclients.tendermint.v1.Fraction value) { + copyOnWrite(); + instance.mergeTrustLevel(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + */ + public Builder clearTrustLevel() { copyOnWrite(); + instance.clearTrustLevel(); + return this; + } + + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasTrustingPeriod() { + return instance.hasTrustingPeriod(); + } + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getTrustingPeriod() { + return instance.getTrustingPeriod(); + } + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setTrustingPeriod(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.setTrustingPeriod(value); + return this; + } + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setTrustingPeriod( + com.google.protobuf.Duration.Builder builderForValue) { + copyOnWrite(); + instance.setTrustingPeriod(builderForValue.build()); + return this; + } + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder mergeTrustingPeriod(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.mergeTrustingPeriod(value); + return this; + } + /** + *
+     * duration of the period since the LastestTimestamp during which the
+     * submitted headers are valid for upgrade
+     * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder clearTrustingPeriod() { copyOnWrite(); + instance.clearTrustingPeriod(); + return this; + } + + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasUnbondingPeriod() { + return instance.hasUnbondingPeriod(); + } + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getUnbondingPeriod() { + return instance.getUnbondingPeriod(); + } + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setUnbondingPeriod(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.setUnbondingPeriod(value); + return this; + } + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setUnbondingPeriod( + com.google.protobuf.Duration.Builder builderForValue) { + copyOnWrite(); + instance.setUnbondingPeriod(builderForValue.build()); + return this; + } + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder mergeUnbondingPeriod(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.mergeUnbondingPeriod(value); + return this; + } + /** + *
+     * duration of the staking unbonding period
+     * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder clearUnbondingPeriod() { copyOnWrite(); + instance.clearUnbondingPeriod(); + return this; + } + + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public boolean hasMaxClockDrift() { + return instance.hasMaxClockDrift(); + } + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxClockDrift() { + return instance.getMaxClockDrift(); + } + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setMaxClockDrift(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.setMaxClockDrift(value); + return this; + } + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder setMaxClockDrift( + com.google.protobuf.Duration.Builder builderForValue) { + copyOnWrite(); + instance.setMaxClockDrift(builderForValue.build()); + return this; + } + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder mergeMaxClockDrift(com.google.protobuf.Duration value) { + copyOnWrite(); + instance.mergeMaxClockDrift(value); + return this; + } + /** + *
+     * defines how much new (untrusted) header's Time can drift into the future.
+     * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + */ + public Builder clearMaxClockDrift() { copyOnWrite(); + instance.clearMaxClockDrift(); + return this; + } + + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasFrozenHeight() { + return instance.hasFrozenHeight(); + } + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getFrozenHeight() { + return instance.getFrozenHeight(); + } + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + public Builder setFrozenHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.setFrozenHeight(value); + return this; + } + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + public Builder setFrozenHeight( + com.ibc.core.client.v1.Height.Builder builderForValue) { + copyOnWrite(); + instance.setFrozenHeight(builderForValue.build()); + return this; + } + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + public Builder mergeFrozenHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.mergeFrozenHeight(value); + return this; + } + /** + *
+     * Block height when the client was frozen due to a misbehaviour
+     * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + */ + public Builder clearFrozenHeight() { copyOnWrite(); + instance.clearFrozenHeight(); + return this; + } + + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasLatestHeight() { + return instance.hasLatestHeight(); + } + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getLatestHeight() { + return instance.getLatestHeight(); + } + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + public Builder setLatestHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.setLatestHeight(value); + return this; + } + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + public Builder setLatestHeight( + com.ibc.core.client.v1.Height.Builder builderForValue) { + copyOnWrite(); + instance.setLatestHeight(builderForValue.build()); + return this; + } + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + public Builder mergeLatestHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.mergeLatestHeight(value); + return this; + } + /** + *
+     * Latest height the client was updated to
+     * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + */ + public Builder clearLatestHeight() { copyOnWrite(); + instance.clearLatestHeight(); + return this; + } + + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public java.util.List getProofSpecsList() { + return java.util.Collections.unmodifiableList( + instance.getProofSpecsList()); + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public int getProofSpecsCount() { + return instance.getProofSpecsCount(); + }/** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + @java.lang.Override + public com.cosmos.ics23.v1.ProofSpec getProofSpecs(int index) { + return instance.getProofSpecs(index); + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder setProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec value) { + copyOnWrite(); + instance.setProofSpecs(index, value); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder setProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec.Builder builderForValue) { + copyOnWrite(); + instance.setProofSpecs(index, + builderForValue.build()); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder addProofSpecs(com.cosmos.ics23.v1.ProofSpec value) { + copyOnWrite(); + instance.addProofSpecs(value); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder addProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec value) { + copyOnWrite(); + instance.addProofSpecs(index, value); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder addProofSpecs( + com.cosmos.ics23.v1.ProofSpec.Builder builderForValue) { + copyOnWrite(); + instance.addProofSpecs(builderForValue.build()); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder addProofSpecs( + int index, com.cosmos.ics23.v1.ProofSpec.Builder builderForValue) { + copyOnWrite(); + instance.addProofSpecs(index, + builderForValue.build()); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder addAllProofSpecs( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllProofSpecs(values); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder clearProofSpecs() { + copyOnWrite(); + instance.clearProofSpecs(); + return this; + } + /** + *
+     * Proof specifications used in verifying counterparty state
+     * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + public Builder removeProofSpecs(int index) { + copyOnWrite(); + instance.removeProofSpecs(index); + return this; + } + + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return A list containing the upgradePath. + */ + @java.lang.Override + public java.util.List + getUpgradePathList() { + return java.util.Collections.unmodifiableList( + instance.getUpgradePathList()); + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return The count of upgradePath. + */ + @java.lang.Override + public int getUpgradePathCount() { + return instance.getUpgradePathCount(); + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the element to return. + * @return The upgradePath at the given index. + */ + @java.lang.Override + public java.lang.String getUpgradePath(int index) { + return instance.getUpgradePath(index); + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the value to return. + * @return The bytes of the upgradePath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpgradePathBytes(int index) { + return instance.getUpgradePathBytes(index); + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index to set the value at. + * @param value The upgradePath to set. + * @return This builder for chaining. + */ + public Builder setUpgradePath( + int index, java.lang.String value) { + copyOnWrite(); + instance.setUpgradePath(index, value); + return this; + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param value The upgradePath to add. + * @return This builder for chaining. + */ + public Builder addUpgradePath( + java.lang.String value) { + copyOnWrite(); + instance.addUpgradePath(value); + return this; + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param values The upgradePath to add. + * @return This builder for chaining. + */ + public Builder addAllUpgradePath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllUpgradePath(values); + return this; + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return This builder for chaining. + */ + public Builder clearUpgradePath() { + copyOnWrite(); + instance.clearUpgradePath(); + return this; + } + /** + *
+     * Path at which next upgraded client will be committed.
+     * Each element corresponds to the key for a single CommitmentProof in the
+     * chained proof. NOTE: ClientState must stored under
+     * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+     * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+     * the default upgrade module, upgrade_path should be []string{"upgrade",
+     * "upgradedIBCState"}`
+     * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param value The bytes of the upgradePath to add. + * @return This builder for chaining. + */ + public Builder addUpgradePathBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addUpgradePathBytes(value); + return this; + } + + /** + *
+     * allow_update_after_expiry is deprecated
+     * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @return The allowUpdateAfterExpiry. + */ + @java.lang.Override + @java.lang.Deprecated public boolean getAllowUpdateAfterExpiry() { + return instance.getAllowUpdateAfterExpiry(); + } + /** + *
+     * allow_update_after_expiry is deprecated
+     * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @param value The allowUpdateAfterExpiry to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setAllowUpdateAfterExpiry(boolean value) { + copyOnWrite(); + instance.setAllowUpdateAfterExpiry(value); + return this; + } + /** + *
+     * allow_update_after_expiry is deprecated
+     * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearAllowUpdateAfterExpiry() { + copyOnWrite(); + instance.clearAllowUpdateAfterExpiry(); + return this; + } + + /** + *
+     * allow_update_after_misbehaviour is deprecated
+     * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @return The allowUpdateAfterMisbehaviour. + */ + @java.lang.Override + @java.lang.Deprecated public boolean getAllowUpdateAfterMisbehaviour() { + return instance.getAllowUpdateAfterMisbehaviour(); + } + /** + *
+     * allow_update_after_misbehaviour is deprecated
+     * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @param value The allowUpdateAfterMisbehaviour to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setAllowUpdateAfterMisbehaviour(boolean value) { + copyOnWrite(); + instance.setAllowUpdateAfterMisbehaviour(value); + return this; + } + /** + *
+     * allow_update_after_misbehaviour is deprecated
+     * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearAllowUpdateAfterMisbehaviour() { + copyOnWrite(); + instance.clearAllowUpdateAfterMisbehaviour(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.lightclients.tendermint.v1.ClientState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.lightclients.tendermint.v1.ClientState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "chainId_", + "trustLevel_", + "trustingPeriod_", + "unbondingPeriod_", + "maxClockDrift_", + "frozenHeight_", + "latestHeight_", + "proofSpecs_", + com.cosmos.ics23.v1.ProofSpec.class, + "upgradePath_", + "allowUpdateAfterExpiry_", + "allowUpdateAfterMisbehaviour_", + }; + java.lang.String info = + "\u0000\u000b\u0000\u0000\u0001\u000b\u000b\u0000\u0002\u0000\u0001\u0208\u0002\t" + + "\u0003\t\u0004\t\u0005\t\u0006\t\u0007\t\b\u001b\t\u021a\n\u0007\u000b\u0007"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.lightclients.tendermint.v1.ClientState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.lightclients.tendermint.v1.ClientState) + private static final com.ibc.lightclients.tendermint.v1.ClientState DEFAULT_INSTANCE; + static { + ClientState defaultInstance = new ClientState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ClientState.class, defaultInstance); + } + + public static com.ibc.lightclients.tendermint.v1.ClientState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientStateOrBuilder.java new file mode 100644 index 000000000..c0b655b51 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ClientStateOrBuilder.java @@ -0,0 +1,244 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public interface ClientStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.lightclients.tendermint.v1.ClientState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The chainId. + */ + java.lang.String getChainId(); + /** + * string chain_id = 1 [json_name = "chainId"]; + * @return The bytes for chainId. + */ + com.google.protobuf.ByteString + getChainIdBytes(); + + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + * @return Whether the trustLevel field is set. + */ + boolean hasTrustLevel(); + /** + * .ibc.lightclients.tendermint.v1.Fraction trust_level = 2 [json_name = "trustLevel", (.gogoproto.nullable) = false]; + * @return The trustLevel. + */ + com.ibc.lightclients.tendermint.v1.Fraction getTrustLevel(); + + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return Whether the trustingPeriod field is set. + */ + boolean hasTrustingPeriod(); + /** + *
+   * duration of the period since the LastestTimestamp during which the
+   * submitted headers are valid for upgrade
+   * 
+ * + * .google.protobuf.Duration trusting_period = 3 [json_name = "trustingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return The trustingPeriod. + */ + com.google.protobuf.Duration getTrustingPeriod(); + + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return Whether the unbondingPeriod field is set. + */ + boolean hasUnbondingPeriod(); + /** + *
+   * duration of the staking unbonding period
+   * 
+ * + * .google.protobuf.Duration unbonding_period = 4 [json_name = "unbondingPeriod", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return The unbondingPeriod. + */ + com.google.protobuf.Duration getUnbondingPeriod(); + + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return Whether the maxClockDrift field is set. + */ + boolean hasMaxClockDrift(); + /** + *
+   * defines how much new (untrusted) header's Time can drift into the future.
+   * 
+ * + * .google.protobuf.Duration max_clock_drift = 5 [json_name = "maxClockDrift", (.gogoproto.nullable) = false, (.gogoproto.stdduration) = true]; + * @return The maxClockDrift. + */ + com.google.protobuf.Duration getMaxClockDrift(); + + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + * @return Whether the frozenHeight field is set. + */ + boolean hasFrozenHeight(); + /** + *
+   * Block height when the client was frozen due to a misbehaviour
+   * 
+ * + * .ibc.core.client.v1.Height frozen_height = 6 [json_name = "frozenHeight", (.gogoproto.nullable) = false]; + * @return The frozenHeight. + */ + com.ibc.core.client.v1.Height getFrozenHeight(); + + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + * @return Whether the latestHeight field is set. + */ + boolean hasLatestHeight(); + /** + *
+   * Latest height the client was updated to
+   * 
+ * + * .ibc.core.client.v1.Height latest_height = 7 [json_name = "latestHeight", (.gogoproto.nullable) = false]; + * @return The latestHeight. + */ + com.ibc.core.client.v1.Height getLatestHeight(); + + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + java.util.List + getProofSpecsList(); + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + com.cosmos.ics23.v1.ProofSpec getProofSpecs(int index); + /** + *
+   * Proof specifications used in verifying counterparty state
+   * 
+ * + * repeated .cosmos.ics23.v1.ProofSpec proof_specs = 8 [json_name = "proofSpecs"]; + */ + int getProofSpecsCount(); + + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return A list containing the upgradePath. + */ + java.util.List + getUpgradePathList(); + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @return The count of upgradePath. + */ + int getUpgradePathCount(); + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the element to return. + * @return The upgradePath at the given index. + */ + java.lang.String getUpgradePath(int index); + /** + *
+   * Path at which next upgraded client will be committed.
+   * Each element corresponds to the key for a single CommitmentProof in the
+   * chained proof. NOTE: ClientState must stored under
+   * `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored
+   * under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using
+   * the default upgrade module, upgrade_path should be []string{"upgrade",
+   * "upgradedIBCState"}`
+   * 
+ * + * repeated string upgrade_path = 9 [json_name = "upgradePath"]; + * @param index The index of the element to return. + * @return The upgradePath at the given index. + */ + com.google.protobuf.ByteString + getUpgradePathBytes(int index); + + /** + *
+   * allow_update_after_expiry is deprecated
+   * 
+ * + * bool allow_update_after_expiry = 10 [json_name = "allowUpdateAfterExpiry", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_expiry is deprecated. + * See clients/tendermint/TendermintLight.proto;l=47 + * @return The allowUpdateAfterExpiry. + */ + @java.lang.Deprecated boolean getAllowUpdateAfterExpiry(); + + /** + *
+   * allow_update_after_misbehaviour is deprecated
+   * 
+ * + * bool allow_update_after_misbehaviour = 11 [json_name = "allowUpdateAfterMisbehaviour", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.ClientState.allow_update_after_misbehaviour is deprecated. + * See clients/tendermint/TendermintLight.proto;l=49 + * @return The allowUpdateAfterMisbehaviour. + */ + @java.lang.Deprecated boolean getAllowUpdateAfterMisbehaviour(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusState.java new file mode 100644 index 000000000..90393a79b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusState.java @@ -0,0 +1,536 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +/** + *
+ * ConsensusState defines the consensus state from Tendermint.
+ * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.ConsensusState} + */ +public final class ConsensusState extends + com.google.protobuf.GeneratedMessageLite< + ConsensusState, ConsensusState.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.lightclients.tendermint.v1.ConsensusState) + ConsensusStateOrBuilder { + private ConsensusState() { + nextValidatorsHash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp timestamp_; + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void setTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + timestamp_ = value; + + } + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + if (timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + + } + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void clearTimestamp() { timestamp_ = null; + + } + + public static final int ROOT_FIELD_NUMBER = 2; + private com.ibc.core.commitment.v1.MerkleRoot root_; + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasRoot() { + return root_ != null; + } + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.commitment.v1.MerkleRoot getRoot() { + return root_ == null ? com.ibc.core.commitment.v1.MerkleRoot.getDefaultInstance() : root_; + } + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + private void setRoot(com.ibc.core.commitment.v1.MerkleRoot value) { + value.getClass(); + root_ = value; + + } + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeRoot(com.ibc.core.commitment.v1.MerkleRoot value) { + value.getClass(); + if (root_ != null && + root_ != com.ibc.core.commitment.v1.MerkleRoot.getDefaultInstance()) { + root_ = + com.ibc.core.commitment.v1.MerkleRoot.newBuilder(root_).mergeFrom(value).buildPartial(); + } else { + root_ = value; + } + + } + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + private void clearRoot() { root_ = null; + + } + + public static final int NEXT_VALIDATORS_HASH_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextValidatorsHash_; + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @return The nextValidatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidatorsHash() { + return nextValidatorsHash_; + } + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @param value The nextValidatorsHash to set. + */ + private void setNextValidatorsHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + nextValidatorsHash_ = value; + } + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + */ + private void clearNextValidatorsHash() { + + nextValidatorsHash_ = getDefaultInstance().getNextValidatorsHash(); + } + + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.ConsensusState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.lightclients.tendermint.v1.ConsensusState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ConsensusState defines the consensus state from Tendermint.
+   * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.ConsensusState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.lightclients.tendermint.v1.ConsensusState, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.lightclients.tendermint.v1.ConsensusState) + com.ibc.lightclients.tendermint.v1.ConsensusStateOrBuilder { + // Construct using com.ibc.lightclients.tendermint.v1.ConsensusState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return instance.hasTimestamp(); + } + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return instance.getTimestamp(); + } + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTimestamp(value); + return this; + } + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTimestamp(builderForValue.build()); + return this; + } + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTimestamp(value); + return this; + } + /** + *
+     * timestamp that corresponds to the block height in which the ConsensusState
+     * was stored.
+     * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder clearTimestamp() { copyOnWrite(); + instance.clearTimestamp(); + return this; + } + + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasRoot() { + return instance.hasRoot(); + } + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.commitment.v1.MerkleRoot getRoot() { + return instance.getRoot(); + } + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + public Builder setRoot(com.ibc.core.commitment.v1.MerkleRoot value) { + copyOnWrite(); + instance.setRoot(value); + return this; + } + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + public Builder setRoot( + com.ibc.core.commitment.v1.MerkleRoot.Builder builderForValue) { + copyOnWrite(); + instance.setRoot(builderForValue.build()); + return this; + } + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + public Builder mergeRoot(com.ibc.core.commitment.v1.MerkleRoot value) { + copyOnWrite(); + instance.mergeRoot(value); + return this; + } + /** + *
+     * commitment root (i.e app hash)
+     * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + */ + public Builder clearRoot() { copyOnWrite(); + instance.clearRoot(); + return this; + } + + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @return The nextValidatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidatorsHash() { + return instance.getNextValidatorsHash(); + } + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @param value The nextValidatorsHash to set. + * @return This builder for chaining. + */ + public Builder setNextValidatorsHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNextValidatorsHash(value); + return this; + } + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @return This builder for chaining. + */ + public Builder clearNextValidatorsHash() { + copyOnWrite(); + instance.clearNextValidatorsHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.lightclients.tendermint.v1.ConsensusState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.lightclients.tendermint.v1.ConsensusState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "timestamp_", + "root_", + "nextValidatorsHash_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + + "\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.lightclients.tendermint.v1.ConsensusState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.lightclients.tendermint.v1.ConsensusState) + private static final com.ibc.lightclients.tendermint.v1.ConsensusState DEFAULT_INSTANCE; + static { + ConsensusState defaultInstance = new ConsensusState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ConsensusState.class, defaultInstance); + } + + public static com.ibc.lightclients.tendermint.v1.ConsensusState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusStateOrBuilder.java new file mode 100644 index 000000000..5e2a28b8d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/ConsensusStateOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public interface ConsensusStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.lightclients.tendermint.v1.ConsensusState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + *
+   * timestamp that corresponds to the block height in which the ConsensusState
+   * was stored.
+   * 
+ * + * .google.protobuf.Timestamp timestamp = 1 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + * @return Whether the root field is set. + */ + boolean hasRoot(); + /** + *
+   * commitment root (i.e app hash)
+   * 
+ * + * .ibc.core.commitment.v1.MerkleRoot root = 2 [json_name = "root", (.gogoproto.nullable) = false]; + * @return The root. + */ + com.ibc.core.commitment.v1.MerkleRoot getRoot(); + + /** + * bytes next_validators_hash = 3 [json_name = "nextValidatorsHash", (.gogoproto.casttype) = "github.com/cometbft/cometbft/libs/bytes.HexBytes"]; + * @return The nextValidatorsHash. + */ + com.google.protobuf.ByteString getNextValidatorsHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Fraction.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Fraction.java new file mode 100644 index 000000000..23f421469 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Fraction.java @@ -0,0 +1,304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +/** + *
+ * Fraction defines the protobuf message type for tmmath.Fraction that only
+ * supports positive values.
+ * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Fraction} + */ +public final class Fraction extends + com.google.protobuf.GeneratedMessageLite< + Fraction, Fraction.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.lightclients.tendermint.v1.Fraction) + FractionOrBuilder { + private Fraction() { + } + public static final int NUMERATOR_FIELD_NUMBER = 1; + private long numerator_; + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + @java.lang.Override + public long getNumerator() { + return numerator_; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @param value The numerator to set. + */ + private void setNumerator(long value) { + + numerator_ = value; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + */ + private void clearNumerator() { + + numerator_ = 0L; + } + + public static final int DENOMINATOR_FIELD_NUMBER = 2; + private long denominator_; + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + @java.lang.Override + public long getDenominator() { + return denominator_; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @param value The denominator to set. + */ + private void setDenominator(long value) { + + denominator_ = value; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + */ + private void clearDenominator() { + + denominator_ = 0L; + } + + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Fraction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.lightclients.tendermint.v1.Fraction prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Fraction defines the protobuf message type for tmmath.Fraction that only
+   * supports positive values.
+   * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Fraction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.lightclients.tendermint.v1.Fraction, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.lightclients.tendermint.v1.Fraction) + com.ibc.lightclients.tendermint.v1.FractionOrBuilder { + // Construct using com.ibc.lightclients.tendermint.v1.Fraction.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + @java.lang.Override + public long getNumerator() { + return instance.getNumerator(); + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @param value The numerator to set. + * @return This builder for chaining. + */ + public Builder setNumerator(long value) { + copyOnWrite(); + instance.setNumerator(value); + return this; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return This builder for chaining. + */ + public Builder clearNumerator() { + copyOnWrite(); + instance.clearNumerator(); + return this; + } + + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + @java.lang.Override + public long getDenominator() { + return instance.getDenominator(); + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @param value The denominator to set. + * @return This builder for chaining. + */ + public Builder setDenominator(long value) { + copyOnWrite(); + instance.setDenominator(value); + return this; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return This builder for chaining. + */ + public Builder clearDenominator() { + copyOnWrite(); + instance.clearDenominator(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.lightclients.tendermint.v1.Fraction) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.lightclients.tendermint.v1.Fraction(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "numerator_", + "denominator_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.lightclients.tendermint.v1.Fraction.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.lightclients.tendermint.v1.Fraction) + private static final com.ibc.lightclients.tendermint.v1.Fraction DEFAULT_INSTANCE; + static { + Fraction defaultInstance = new Fraction(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Fraction.class, defaultInstance); + } + + public static com.ibc.lightclients.tendermint.v1.Fraction getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/FractionOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/FractionOrBuilder.java new file mode 100644 index 000000000..cb3f30b0c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/FractionOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public interface FractionOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.lightclients.tendermint.v1.Fraction) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + long getNumerator(); + + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + long getDenominator(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Header.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Header.java new file mode 100644 index 000000000..5d6d0d682 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Header.java @@ -0,0 +1,590 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +/** + *
+ * Header defines the Tendermint client consensus Header.
+ * It encapsulates all the information necessary to update from a trusted
+ * Tendermint ConsensusState. The inclusion of TrustedHeight and
+ * TrustedValidators allows this update to process correctly, so long as the
+ * ConsensusState for the TrustedHeight exists, this removes race conditions
+ * among relayers The SignedHeader and ValidatorSet are the new untrusted update
+ * fields for the client. The TrustedHeight is the height of a stored
+ * ConsensusState on the client that will be used to verify the new untrusted
+ * header. The Trusted ConsensusState must be within the unbonding period of
+ * current time in order to correctly verify, and the TrustedValidators must
+ * hash to TrustedConsensusState.NextValidatorsHash since that is the last
+ * trusted validator set at the TrustedHeight.
+ * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Header} + */ +public final class Header extends + com.google.protobuf.GeneratedMessageLite< + Header, Header.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.lightclients.tendermint.v1.Header) + HeaderOrBuilder { + private Header() { + } + public static final int SIGNED_HEADER_FIELD_NUMBER = 1; + private com.tendermint.types.SignedHeader signedHeader_; + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + @java.lang.Override + public boolean hasSignedHeader() { + return signedHeader_ != null; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + @java.lang.Override + public com.tendermint.types.SignedHeader getSignedHeader() { + return signedHeader_ == null ? com.tendermint.types.SignedHeader.getDefaultInstance() : signedHeader_; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + private void setSignedHeader(com.tendermint.types.SignedHeader value) { + value.getClass(); + signedHeader_ = value; + + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeSignedHeader(com.tendermint.types.SignedHeader value) { + value.getClass(); + if (signedHeader_ != null && + signedHeader_ != com.tendermint.types.SignedHeader.getDefaultInstance()) { + signedHeader_ = + com.tendermint.types.SignedHeader.newBuilder(signedHeader_).mergeFrom(value).buildPartial(); + } else { + signedHeader_ = value; + } + + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + private void clearSignedHeader() { signedHeader_ = null; + + } + + public static final int VALIDATOR_SET_FIELD_NUMBER = 2; + private com.tendermint.types.ValidatorSet validatorSet_; + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public boolean hasValidatorSet() { + return validatorSet_ != null; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getValidatorSet() { + return validatorSet_ == null ? com.tendermint.types.ValidatorSet.getDefaultInstance() : validatorSet_; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + private void setValidatorSet(com.tendermint.types.ValidatorSet value) { + value.getClass(); + validatorSet_ = value; + + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeValidatorSet(com.tendermint.types.ValidatorSet value) { + value.getClass(); + if (validatorSet_ != null && + validatorSet_ != com.tendermint.types.ValidatorSet.getDefaultInstance()) { + validatorSet_ = + com.tendermint.types.ValidatorSet.newBuilder(validatorSet_).mergeFrom(value).buildPartial(); + } else { + validatorSet_ = value; + } + + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + private void clearValidatorSet() { validatorSet_ = null; + + } + + public static final int TRUSTED_HEIGHT_FIELD_NUMBER = 3; + private com.ibc.core.client.v1.Height trustedHeight_; + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasTrustedHeight() { + return trustedHeight_ != null; + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getTrustedHeight() { + return trustedHeight_ == null ? com.ibc.core.client.v1.Height.getDefaultInstance() : trustedHeight_; + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + private void setTrustedHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + trustedHeight_ = value; + + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTrustedHeight(com.ibc.core.client.v1.Height value) { + value.getClass(); + if (trustedHeight_ != null && + trustedHeight_ != com.ibc.core.client.v1.Height.getDefaultInstance()) { + trustedHeight_ = + com.ibc.core.client.v1.Height.newBuilder(trustedHeight_).mergeFrom(value).buildPartial(); + } else { + trustedHeight_ = value; + } + + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + private void clearTrustedHeight() { trustedHeight_ = null; + + } + + public static final int TRUSTED_VALIDATORS_FIELD_NUMBER = 4; + private com.tendermint.types.ValidatorSet trustedValidators_; + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + @java.lang.Override + public boolean hasTrustedValidators() { + return trustedValidators_ != null; + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getTrustedValidators() { + return trustedValidators_ == null ? com.tendermint.types.ValidatorSet.getDefaultInstance() : trustedValidators_; + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + private void setTrustedValidators(com.tendermint.types.ValidatorSet value) { + value.getClass(); + trustedValidators_ = value; + + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTrustedValidators(com.tendermint.types.ValidatorSet value) { + value.getClass(); + if (trustedValidators_ != null && + trustedValidators_ != com.tendermint.types.ValidatorSet.getDefaultInstance()) { + trustedValidators_ = + com.tendermint.types.ValidatorSet.newBuilder(trustedValidators_).mergeFrom(value).buildPartial(); + } else { + trustedValidators_ = value; + } + + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + private void clearTrustedValidators() { trustedValidators_ = null; + + } + + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Header parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Header parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.lightclients.tendermint.v1.Header prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Header defines the Tendermint client consensus Header.
+   * It encapsulates all the information necessary to update from a trusted
+   * Tendermint ConsensusState. The inclusion of TrustedHeight and
+   * TrustedValidators allows this update to process correctly, so long as the
+   * ConsensusState for the TrustedHeight exists, this removes race conditions
+   * among relayers The SignedHeader and ValidatorSet are the new untrusted update
+   * fields for the client. The TrustedHeight is the height of a stored
+   * ConsensusState on the client that will be used to verify the new untrusted
+   * header. The Trusted ConsensusState must be within the unbonding period of
+   * current time in order to correctly verify, and the TrustedValidators must
+   * hash to TrustedConsensusState.NextValidatorsHash since that is the last
+   * trusted validator set at the TrustedHeight.
+   * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Header} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.lightclients.tendermint.v1.Header, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.lightclients.tendermint.v1.Header) + com.ibc.lightclients.tendermint.v1.HeaderOrBuilder { + // Construct using com.ibc.lightclients.tendermint.v1.Header.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + @java.lang.Override + public boolean hasSignedHeader() { + return instance.hasSignedHeader(); + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + @java.lang.Override + public com.tendermint.types.SignedHeader getSignedHeader() { + return instance.getSignedHeader(); + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + public Builder setSignedHeader(com.tendermint.types.SignedHeader value) { + copyOnWrite(); + instance.setSignedHeader(value); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + public Builder setSignedHeader( + com.tendermint.types.SignedHeader.Builder builderForValue) { + copyOnWrite(); + instance.setSignedHeader(builderForValue.build()); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + public Builder mergeSignedHeader(com.tendermint.types.SignedHeader value) { + copyOnWrite(); + instance.mergeSignedHeader(value); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + */ + public Builder clearSignedHeader() { copyOnWrite(); + instance.clearSignedHeader(); + return this; + } + + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public boolean hasValidatorSet() { + return instance.hasValidatorSet(); + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getValidatorSet() { + return instance.getValidatorSet(); + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder setValidatorSet(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.setValidatorSet(value); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder setValidatorSet( + com.tendermint.types.ValidatorSet.Builder builderForValue) { + copyOnWrite(); + instance.setValidatorSet(builderForValue.build()); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder mergeValidatorSet(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.mergeValidatorSet(value); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder clearValidatorSet() { copyOnWrite(); + instance.clearValidatorSet(); + return this; + } + + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasTrustedHeight() { + return instance.hasTrustedHeight(); + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.ibc.core.client.v1.Height getTrustedHeight() { + return instance.getTrustedHeight(); + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + public Builder setTrustedHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.setTrustedHeight(value); + return this; + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + public Builder setTrustedHeight( + com.ibc.core.client.v1.Height.Builder builderForValue) { + copyOnWrite(); + instance.setTrustedHeight(builderForValue.build()); + return this; + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + public Builder mergeTrustedHeight(com.ibc.core.client.v1.Height value) { + copyOnWrite(); + instance.mergeTrustedHeight(value); + return this; + } + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + */ + public Builder clearTrustedHeight() { copyOnWrite(); + instance.clearTrustedHeight(); + return this; + } + + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + @java.lang.Override + public boolean hasTrustedValidators() { + return instance.hasTrustedValidators(); + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getTrustedValidators() { + return instance.getTrustedValidators(); + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + public Builder setTrustedValidators(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.setTrustedValidators(value); + return this; + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + public Builder setTrustedValidators( + com.tendermint.types.ValidatorSet.Builder builderForValue) { + copyOnWrite(); + instance.setTrustedValidators(builderForValue.build()); + return this; + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + public Builder mergeTrustedValidators(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.mergeTrustedValidators(value); + return this; + } + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + */ + public Builder clearTrustedValidators() { copyOnWrite(); + instance.clearTrustedValidators(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.lightclients.tendermint.v1.Header) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.lightclients.tendermint.v1.Header(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "signedHeader_", + "validatorSet_", + "trustedHeight_", + "trustedValidators_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + + "\t\u0004\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.lightclients.tendermint.v1.Header.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.lightclients.tendermint.v1.Header) + private static final com.ibc.lightclients.tendermint.v1.Header DEFAULT_INSTANCE; + static { + Header defaultInstance = new Header(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Header.class, defaultInstance); + } + + public static com.ibc.lightclients.tendermint.v1.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser
PARSER; + + public static com.google.protobuf.Parser
parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/HeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/HeaderOrBuilder.java new file mode 100644 index 000000000..84e0e0276 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/HeaderOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.lightclients.tendermint.v1.Header) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + * @return Whether the signedHeader field is set. + */ + boolean hasSignedHeader(); + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader", (.gogoproto.embed) = true]; + * @return The signedHeader. + */ + com.tendermint.types.SignedHeader getSignedHeader(); + + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + * @return Whether the validatorSet field is set. + */ + boolean hasValidatorSet(); + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + * @return The validatorSet. + */ + com.tendermint.types.ValidatorSet getValidatorSet(); + + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + * @return Whether the trustedHeight field is set. + */ + boolean hasTrustedHeight(); + /** + * .ibc.core.client.v1.Height trusted_height = 3 [json_name = "trustedHeight", (.gogoproto.nullable) = false]; + * @return The trustedHeight. + */ + com.ibc.core.client.v1.Height getTrustedHeight(); + + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + * @return Whether the trustedValidators field is set. + */ + boolean hasTrustedValidators(); + /** + * .tendermint.types.ValidatorSet trusted_validators = 4 [json_name = "trustedValidators"]; + * @return The trustedValidators. + */ + com.tendermint.types.ValidatorSet getTrustedValidators(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Misbehaviour.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Misbehaviour.java new file mode 100644 index 000000000..d4bf1ba1e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/Misbehaviour.java @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +/** + *
+ * Misbehaviour is a wrapper over two conflicting Headers
+ * that implements Misbehaviour interface expected by ICS-02
+ * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Misbehaviour} + */ +public final class Misbehaviour extends + com.google.protobuf.GeneratedMessageLite< + Misbehaviour, Misbehaviour.Builder> implements + // @@protoc_insertion_point(message_implements:ibc.lightclients.tendermint.v1.Misbehaviour) + MisbehaviourOrBuilder { + private Misbehaviour() { + clientId_ = ""; + } + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The clientId. + */ + @java.lang.Override + @java.lang.Deprecated public java.lang.String getClientId() { + return clientId_; + } + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The bytes for clientId. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int HEADER_1_FIELD_NUMBER = 2; + private com.ibc.lightclients.tendermint.v1.Header header1_; + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + @java.lang.Override + public boolean hasHeader1() { + return header1_ != null; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Header getHeader1() { + return header1_ == null ? com.ibc.lightclients.tendermint.v1.Header.getDefaultInstance() : header1_; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + private void setHeader1(com.ibc.lightclients.tendermint.v1.Header value) { + value.getClass(); + header1_ = value; + + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader1(com.ibc.lightclients.tendermint.v1.Header value) { + value.getClass(); + if (header1_ != null && + header1_ != com.ibc.lightclients.tendermint.v1.Header.getDefaultInstance()) { + header1_ = + com.ibc.lightclients.tendermint.v1.Header.newBuilder(header1_).mergeFrom(value).buildPartial(); + } else { + header1_ = value; + } + + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + private void clearHeader1() { header1_ = null; + + } + + public static final int HEADER_2_FIELD_NUMBER = 3; + private com.ibc.lightclients.tendermint.v1.Header header2_; + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + @java.lang.Override + public boolean hasHeader2() { + return header2_ != null; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Header getHeader2() { + return header2_ == null ? com.ibc.lightclients.tendermint.v1.Header.getDefaultInstance() : header2_; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + private void setHeader2(com.ibc.lightclients.tendermint.v1.Header value) { + value.getClass(); + header2_ = value; + + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader2(com.ibc.lightclients.tendermint.v1.Header value) { + value.getClass(); + if (header2_ != null && + header2_ != com.ibc.lightclients.tendermint.v1.Header.getDefaultInstance()) { + header2_ = + com.ibc.lightclients.tendermint.v1.Header.newBuilder(header2_).mergeFrom(value).buildPartial(); + } else { + header2_ = value; + } + + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + private void clearHeader2() { header2_ = null; + + } + + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.ibc.lightclients.tendermint.v1.Misbehaviour parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.ibc.lightclients.tendermint.v1.Misbehaviour prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Misbehaviour is a wrapper over two conflicting Headers
+   * that implements Misbehaviour interface expected by ICS-02
+   * 
+ * + * Protobuf type {@code ibc.lightclients.tendermint.v1.Misbehaviour} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.ibc.lightclients.tendermint.v1.Misbehaviour, Builder> implements + // @@protoc_insertion_point(builder_implements:ibc.lightclients.tendermint.v1.Misbehaviour) + com.ibc.lightclients.tendermint.v1.MisbehaviourOrBuilder { + // Construct using com.ibc.lightclients.tendermint.v1.Misbehaviour.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * ClientID is deprecated
+     * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The clientId. + */ + @java.lang.Override + @java.lang.Deprecated public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + *
+     * ClientID is deprecated
+     * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The bytes for clientId. + */ + @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + *
+     * ClientID is deprecated
+     * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @param value The clientId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + *
+     * ClientID is deprecated
+     * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + *
+     * ClientID is deprecated
+     * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + @java.lang.Override + public boolean hasHeader1() { + return instance.hasHeader1(); + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Header getHeader1() { + return instance.getHeader1(); + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + public Builder setHeader1(com.ibc.lightclients.tendermint.v1.Header value) { + copyOnWrite(); + instance.setHeader1(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + public Builder setHeader1( + com.ibc.lightclients.tendermint.v1.Header.Builder builderForValue) { + copyOnWrite(); + instance.setHeader1(builderForValue.build()); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + public Builder mergeHeader1(com.ibc.lightclients.tendermint.v1.Header value) { + copyOnWrite(); + instance.mergeHeader1(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + */ + public Builder clearHeader1() { copyOnWrite(); + instance.clearHeader1(); + return this; + } + + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + @java.lang.Override + public boolean hasHeader2() { + return instance.hasHeader2(); + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + @java.lang.Override + public com.ibc.lightclients.tendermint.v1.Header getHeader2() { + return instance.getHeader2(); + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + public Builder setHeader2(com.ibc.lightclients.tendermint.v1.Header value) { + copyOnWrite(); + instance.setHeader2(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + public Builder setHeader2( + com.ibc.lightclients.tendermint.v1.Header.Builder builderForValue) { + copyOnWrite(); + instance.setHeader2(builderForValue.build()); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + public Builder mergeHeader2(com.ibc.lightclients.tendermint.v1.Header value) { + copyOnWrite(); + instance.mergeHeader2(value); + return this; + } + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + */ + public Builder clearHeader2() { copyOnWrite(); + instance.clearHeader2(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ibc.lightclients.tendermint.v1.Misbehaviour) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.ibc.lightclients.tendermint.v1.Misbehaviour(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "header1_", + "header2_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\t" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.ibc.lightclients.tendermint.v1.Misbehaviour.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:ibc.lightclients.tendermint.v1.Misbehaviour) + private static final com.ibc.lightclients.tendermint.v1.Misbehaviour DEFAULT_INSTANCE; + static { + Misbehaviour defaultInstance = new Misbehaviour(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Misbehaviour.class, defaultInstance); + } + + public static com.ibc.lightclients.tendermint.v1.Misbehaviour getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/MisbehaviourOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/MisbehaviourOrBuilder.java new file mode 100644 index 000000000..d1c64b556 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/MisbehaviourOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public interface MisbehaviourOrBuilder extends + // @@protoc_insertion_point(interface_extends:ibc.lightclients.tendermint.v1.Misbehaviour) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The clientId. + */ + @java.lang.Deprecated java.lang.String getClientId(); + /** + *
+   * ClientID is deprecated
+   * 
+ * + * string client_id = 1 [json_name = "clientId", deprecated = true]; + * @deprecated ibc.lightclients.tendermint.v1.Misbehaviour.client_id is deprecated. + * See clients/tendermint/TendermintLight.proto;l=70 + * @return The bytes for clientId. + */ + @java.lang.Deprecated com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + * @return Whether the header1 field is set. + */ + boolean hasHeader1(); + /** + * .ibc.lightclients.tendermint.v1.Header header_1 = 2 [json_name = "header1", (.gogoproto.customname) = "Header1"]; + * @return The header1. + */ + com.ibc.lightclients.tendermint.v1.Header getHeader1(); + + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + * @return Whether the header2 field is set. + */ + boolean hasHeader2(); + /** + * .ibc.lightclients.tendermint.v1.Header header_2 = 3 [json_name = "header2", (.gogoproto.customname) = "Header2"]; + * @return The header2. + */ + com.ibc.lightclients.tendermint.v1.Header getHeader2(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/TendermintLightProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/TendermintLightProto.java new file mode 100644 index 000000000..67f6eafe9 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/ibc/lightclients/tendermint/v1/TendermintLightProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: clients/tendermint/TendermintLight.proto + +package com.ibc.lightclients.tendermint.v1; + +public final class TendermintLightProto { + private TendermintLightProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdate.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdate.java new file mode 100644 index 000000000..12cacd022 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdate.java @@ -0,0 +1,277 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +/** + * Protobuf type {@code icon.lightclient.v1.BlockUpdate} + */ +public final class BlockUpdate extends + com.google.protobuf.GeneratedMessageLite< + BlockUpdate, BlockUpdate.Builder> implements + // @@protoc_insertion_point(message_implements:icon.lightclient.v1.BlockUpdate) + BlockUpdateOrBuilder { + private BlockUpdate() { + } + public static final int HEADER_FIELD_NUMBER = 1; + private com.icon.types.v1.SignedHeader header_; + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.icon.types.v1.SignedHeader getHeader() { + return header_ == null ? com.icon.types.v1.SignedHeader.getDefaultInstance() : header_; + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + private void setHeader(com.icon.types.v1.SignedHeader value) { + value.getClass(); + header_ = value; + + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader(com.icon.types.v1.SignedHeader value) { + value.getClass(); + if (header_ != null && + header_ != com.icon.types.v1.SignedHeader.getDefaultInstance()) { + header_ = + com.icon.types.v1.SignedHeader.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + private void clearHeader() { header_ = null; + + } + + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.BlockUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.BlockUpdate parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.BlockUpdate parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.lightclient.v1.BlockUpdate prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.lightclient.v1.BlockUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.lightclient.v1.BlockUpdate, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.lightclient.v1.BlockUpdate) + com.icon.lightclient.v1.BlockUpdateOrBuilder { + // Construct using com.icon.lightclient.v1.BlockUpdate.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return instance.hasHeader(); + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.icon.types.v1.SignedHeader getHeader() { + return instance.getHeader(); + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + public Builder setHeader(com.icon.types.v1.SignedHeader value) { + copyOnWrite(); + instance.setHeader(value); + return this; + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + public Builder setHeader( + com.icon.types.v1.SignedHeader.Builder builderForValue) { + copyOnWrite(); + instance.setHeader(builderForValue.build()); + return this; + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + public Builder mergeHeader(com.icon.types.v1.SignedHeader value) { + copyOnWrite(); + instance.mergeHeader(value); + return this; + } + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + */ + public Builder clearHeader() { copyOnWrite(); + instance.clearHeader(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.lightclient.v1.BlockUpdate) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.lightclient.v1.BlockUpdate(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "header_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.lightclient.v1.BlockUpdate.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.lightclient.v1.BlockUpdate) + private static final com.icon.lightclient.v1.BlockUpdate DEFAULT_INSTANCE; + static { + BlockUpdate defaultInstance = new BlockUpdate(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BlockUpdate.class, defaultInstance); + } + + public static com.icon.lightclient.v1.BlockUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdateOrBuilder.java new file mode 100644 index 000000000..aa1e9f992 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/BlockUpdateOrBuilder.java @@ -0,0 +1,20 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public interface BlockUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.lightclient.v1.BlockUpdate) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .icon.types.v1.SignedHeader header = 1 [json_name = "header"]; + * @return The header. + */ + com.icon.types.v1.SignedHeader getHeader(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientState.java new file mode 100644 index 000000000..aebe3fbf6 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientState.java @@ -0,0 +1,612 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +/** + * Protobuf type {@code icon.lightclient.v1.ClientState} + */ +public final class ClientState extends + com.google.protobuf.GeneratedMessageLite< + ClientState, ClientState.Builder> implements + // @@protoc_insertion_point(message_implements:icon.lightclient.v1.ClientState) + ClientStateOrBuilder { + private ClientState() { + srcNetworkId_ = ""; + } + public static final int TRUSTING_PERIOD_FIELD_NUMBER = 1; + private long trustingPeriod_; + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @return The trustingPeriod. + */ + @java.lang.Override + public long getTrustingPeriod() { + return trustingPeriod_; + } + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @param value The trustingPeriod to set. + */ + private void setTrustingPeriod(long value) { + + trustingPeriod_ = value; + } + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + */ + private void clearTrustingPeriod() { + + trustingPeriod_ = 0L; + } + + public static final int FROZEN_HEIGHT_FIELD_NUMBER = 2; + private long frozenHeight_; + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @return The frozenHeight. + */ + @java.lang.Override + public long getFrozenHeight() { + return frozenHeight_; + } + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @param value The frozenHeight to set. + */ + private void setFrozenHeight(long value) { + + frozenHeight_ = value; + } + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + */ + private void clearFrozenHeight() { + + frozenHeight_ = 0L; + } + + public static final int MAX_CLOCK_DRIFT_FIELD_NUMBER = 3; + private long maxClockDrift_; + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @return The maxClockDrift. + */ + @java.lang.Override + public long getMaxClockDrift() { + return maxClockDrift_; + } + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @param value The maxClockDrift to set. + */ + private void setMaxClockDrift(long value) { + + maxClockDrift_ = value; + } + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + */ + private void clearMaxClockDrift() { + + maxClockDrift_ = 0L; + } + + public static final int LATEST_HEIGHT_FIELD_NUMBER = 4; + private long latestHeight_; + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @return The latestHeight. + */ + @java.lang.Override + public long getLatestHeight() { + return latestHeight_; + } + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @param value The latestHeight to set. + */ + private void setLatestHeight(long value) { + + latestHeight_ = value; + } + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + */ + private void clearLatestHeight() { + + latestHeight_ = 0L; + } + + public static final int SRC_NETWORK_ID_FIELD_NUMBER = 5; + private java.lang.String srcNetworkId_; + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The srcNetworkId. + */ + @java.lang.Override + public java.lang.String getSrcNetworkId() { + return srcNetworkId_; + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The bytes for srcNetworkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSrcNetworkIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(srcNetworkId_); + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @param value The srcNetworkId to set. + */ + private void setSrcNetworkId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + srcNetworkId_ = value; + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + */ + private void clearSrcNetworkId() { + + srcNetworkId_ = getDefaultInstance().getSrcNetworkId(); + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @param value The bytes for srcNetworkId to set. + */ + private void setSrcNetworkIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + srcNetworkId_ = value.toStringUtf8(); + + } + + public static final int NETWORK_ID_FIELD_NUMBER = 6; + private long networkId_; + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @return The networkId. + */ + @java.lang.Override + public long getNetworkId() { + return networkId_; + } + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @param value The networkId to set. + */ + private void setNetworkId(long value) { + + networkId_ = value; + } + /** + * uint64 network_id = 6 [json_name = "networkId"]; + */ + private void clearNetworkId() { + + networkId_ = 0L; + } + + public static final int NETWORK_TYPE_ID_FIELD_NUMBER = 7; + private long networkTypeId_; + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @return The networkTypeId. + */ + @java.lang.Override + public long getNetworkTypeId() { + return networkTypeId_; + } + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @param value The networkTypeId to set. + */ + private void setNetworkTypeId(long value) { + + networkTypeId_ = value; + } + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + */ + private void clearNetworkTypeId() { + + networkTypeId_ = 0L; + } + + public static com.icon.lightclient.v1.ClientState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ClientState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ClientState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.ClientState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ClientState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ClientState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.lightclient.v1.ClientState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.lightclient.v1.ClientState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.lightclient.v1.ClientState, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.lightclient.v1.ClientState) + com.icon.lightclient.v1.ClientStateOrBuilder { + // Construct using com.icon.lightclient.v1.ClientState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @return The trustingPeriod. + */ + @java.lang.Override + public long getTrustingPeriod() { + return instance.getTrustingPeriod(); + } + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @param value The trustingPeriod to set. + * @return This builder for chaining. + */ + public Builder setTrustingPeriod(long value) { + copyOnWrite(); + instance.setTrustingPeriod(value); + return this; + } + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @return This builder for chaining. + */ + public Builder clearTrustingPeriod() { + copyOnWrite(); + instance.clearTrustingPeriod(); + return this; + } + + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @return The frozenHeight. + */ + @java.lang.Override + public long getFrozenHeight() { + return instance.getFrozenHeight(); + } + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @param value The frozenHeight to set. + * @return This builder for chaining. + */ + public Builder setFrozenHeight(long value) { + copyOnWrite(); + instance.setFrozenHeight(value); + return this; + } + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @return This builder for chaining. + */ + public Builder clearFrozenHeight() { + copyOnWrite(); + instance.clearFrozenHeight(); + return this; + } + + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @return The maxClockDrift. + */ + @java.lang.Override + public long getMaxClockDrift() { + return instance.getMaxClockDrift(); + } + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @param value The maxClockDrift to set. + * @return This builder for chaining. + */ + public Builder setMaxClockDrift(long value) { + copyOnWrite(); + instance.setMaxClockDrift(value); + return this; + } + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @return This builder for chaining. + */ + public Builder clearMaxClockDrift() { + copyOnWrite(); + instance.clearMaxClockDrift(); + return this; + } + + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @return The latestHeight. + */ + @java.lang.Override + public long getLatestHeight() { + return instance.getLatestHeight(); + } + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @param value The latestHeight to set. + * @return This builder for chaining. + */ + public Builder setLatestHeight(long value) { + copyOnWrite(); + instance.setLatestHeight(value); + return this; + } + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @return This builder for chaining. + */ + public Builder clearLatestHeight() { + copyOnWrite(); + instance.clearLatestHeight(); + return this; + } + + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The srcNetworkId. + */ + @java.lang.Override + public java.lang.String getSrcNetworkId() { + return instance.getSrcNetworkId(); + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The bytes for srcNetworkId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSrcNetworkIdBytes() { + return instance.getSrcNetworkIdBytes(); + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @param value The srcNetworkId to set. + * @return This builder for chaining. + */ + public Builder setSrcNetworkId( + java.lang.String value) { + copyOnWrite(); + instance.setSrcNetworkId(value); + return this; + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return This builder for chaining. + */ + public Builder clearSrcNetworkId() { + copyOnWrite(); + instance.clearSrcNetworkId(); + return this; + } + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @param value The bytes for srcNetworkId to set. + * @return This builder for chaining. + */ + public Builder setSrcNetworkIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSrcNetworkIdBytes(value); + return this; + } + + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @return The networkId. + */ + @java.lang.Override + public long getNetworkId() { + return instance.getNetworkId(); + } + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @param value The networkId to set. + * @return This builder for chaining. + */ + public Builder setNetworkId(long value) { + copyOnWrite(); + instance.setNetworkId(value); + return this; + } + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @return This builder for chaining. + */ + public Builder clearNetworkId() { + copyOnWrite(); + instance.clearNetworkId(); + return this; + } + + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @return The networkTypeId. + */ + @java.lang.Override + public long getNetworkTypeId() { + return instance.getNetworkTypeId(); + } + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @param value The networkTypeId to set. + * @return This builder for chaining. + */ + public Builder setNetworkTypeId(long value) { + copyOnWrite(); + instance.setNetworkTypeId(value); + return this; + } + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @return This builder for chaining. + */ + public Builder clearNetworkTypeId() { + copyOnWrite(); + instance.clearNetworkTypeId(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.lightclient.v1.ClientState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.lightclient.v1.ClientState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "trustingPeriod_", + "frozenHeight_", + "maxClockDrift_", + "latestHeight_", + "srcNetworkId_", + "networkId_", + "networkTypeId_", + }; + java.lang.String info = + "\u0000\u0007\u0000\u0000\u0001\u0007\u0007\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + "\u0003\u0003\u0004\u0003\u0005\u0208\u0006\u0003\u0007\u0003"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.lightclient.v1.ClientState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.lightclient.v1.ClientState) + private static final com.icon.lightclient.v1.ClientState DEFAULT_INSTANCE; + static { + ClientState defaultInstance = new ClientState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ClientState.class, defaultInstance); + } + + public static com.icon.lightclient.v1.ClientState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientStateOrBuilder.java new file mode 100644 index 000000000..9a9c75914 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ClientStateOrBuilder.java @@ -0,0 +1,57 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public interface ClientStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.lightclient.v1.ClientState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 trusting_period = 1 [json_name = "trustingPeriod"]; + * @return The trustingPeriod. + */ + long getTrustingPeriod(); + + /** + * uint64 frozen_height = 2 [json_name = "frozenHeight"]; + * @return The frozenHeight. + */ + long getFrozenHeight(); + + /** + * uint64 max_clock_drift = 3 [json_name = "maxClockDrift"]; + * @return The maxClockDrift. + */ + long getMaxClockDrift(); + + /** + * uint64 latest_height = 4 [json_name = "latestHeight"]; + * @return The latestHeight. + */ + long getLatestHeight(); + + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The srcNetworkId. + */ + java.lang.String getSrcNetworkId(); + /** + * string src_network_id = 5 [json_name = "srcNetworkId"]; + * @return The bytes for srcNetworkId. + */ + com.google.protobuf.ByteString + getSrcNetworkIdBytes(); + + /** + * uint64 network_id = 6 [json_name = "networkId"]; + * @return The networkId. + */ + long getNetworkId(); + + /** + * uint64 network_type_id = 7 [json_name = "networkTypeId"]; + * @return The networkTypeId. + */ + long getNetworkTypeId(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusState.java new file mode 100644 index 000000000..ea842aa0e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusState.java @@ -0,0 +1,297 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +/** + * Protobuf type {@code icon.lightclient.v1.ConsensusState} + */ +public final class ConsensusState extends + com.google.protobuf.GeneratedMessageLite< + ConsensusState, ConsensusState.Builder> implements + // @@protoc_insertion_point(message_implements:icon.lightclient.v1.ConsensusState) + ConsensusStateOrBuilder { + private ConsensusState() { + messageRoot_ = com.google.protobuf.ByteString.EMPTY; + nextProofContextHash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int MESSAGE_ROOT_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString messageRoot_; + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageRoot() { + return messageRoot_; + } + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @param value The messageRoot to set. + */ + private void setMessageRoot(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + messageRoot_ = value; + } + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + */ + private void clearMessageRoot() { + + messageRoot_ = getDefaultInstance().getMessageRoot(); + } + + public static final int NEXT_PROOF_CONTEXT_HASH_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString nextProofContextHash_; + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextProofContextHash() { + return nextProofContextHash_; + } + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @param value The nextProofContextHash to set. + */ + private void setNextProofContextHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + nextProofContextHash_ = value; + } + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + */ + private void clearNextProofContextHash() { + + nextProofContextHash_ = getDefaultInstance().getNextProofContextHash(); + } + + public static com.icon.lightclient.v1.ConsensusState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.ConsensusState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ConsensusState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.ConsensusState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.lightclient.v1.ConsensusState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.lightclient.v1.ConsensusState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.lightclient.v1.ConsensusState, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.lightclient.v1.ConsensusState) + com.icon.lightclient.v1.ConsensusStateOrBuilder { + // Construct using com.icon.lightclient.v1.ConsensusState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageRoot() { + return instance.getMessageRoot(); + } + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @param value The messageRoot to set. + * @return This builder for chaining. + */ + public Builder setMessageRoot(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setMessageRoot(value); + return this; + } + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @return This builder for chaining. + */ + public Builder clearMessageRoot() { + copyOnWrite(); + instance.clearMessageRoot(); + return this; + } + + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextProofContextHash() { + return instance.getNextProofContextHash(); + } + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @param value The nextProofContextHash to set. + * @return This builder for chaining. + */ + public Builder setNextProofContextHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNextProofContextHash(value); + return this; + } + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @return This builder for chaining. + */ + public Builder clearNextProofContextHash() { + copyOnWrite(); + instance.clearNextProofContextHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.lightclient.v1.ConsensusState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.lightclient.v1.ConsensusState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "messageRoot_", + "nextProofContextHash_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\n\u0002\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.lightclient.v1.ConsensusState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.lightclient.v1.ConsensusState) + private static final com.icon.lightclient.v1.ConsensusState DEFAULT_INSTANCE; + static { + ConsensusState defaultInstance = new ConsensusState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ConsensusState.class, defaultInstance); + } + + public static com.icon.lightclient.v1.ConsensusState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusStateOrBuilder.java new file mode 100644 index 000000000..c9373974a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/ConsensusStateOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public interface ConsensusStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.lightclient.v1.ConsensusState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes message_root = 1 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + com.google.protobuf.ByteString getMessageRoot(); + + /** + * bytes next_proof_context_hash = 2 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + com.google.protobuf.ByteString getNextProofContextHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/LightProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/LightProto.java new file mode 100644 index 000000000..83452e076 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/LightProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public final class LightProto { + private LightProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/Misbehaviour.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/Misbehaviour.java new file mode 100644 index 000000000..89c5c3bb2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/Misbehaviour.java @@ -0,0 +1,470 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +/** + * Protobuf type {@code icon.lightclient.v1.Misbehaviour} + */ +public final class Misbehaviour extends + com.google.protobuf.GeneratedMessageLite< + Misbehaviour, Misbehaviour.Builder> implements + // @@protoc_insertion_point(message_implements:icon.lightclient.v1.Misbehaviour) + MisbehaviourOrBuilder { + private Misbehaviour() { + clientId_ = ""; + } + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return clientId_; + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + * string client_id = 1 [json_name = "clientId"]; + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int HEADER_1_FIELD_NUMBER = 2; + private com.icon.lightclient.v1.BlockUpdate header1_; + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + @java.lang.Override + public boolean hasHeader1() { + return header1_ != null; + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + @java.lang.Override + public com.icon.lightclient.v1.BlockUpdate getHeader1() { + return header1_ == null ? com.icon.lightclient.v1.BlockUpdate.getDefaultInstance() : header1_; + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + private void setHeader1(com.icon.lightclient.v1.BlockUpdate value) { + value.getClass(); + header1_ = value; + + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader1(com.icon.lightclient.v1.BlockUpdate value) { + value.getClass(); + if (header1_ != null && + header1_ != com.icon.lightclient.v1.BlockUpdate.getDefaultInstance()) { + header1_ = + com.icon.lightclient.v1.BlockUpdate.newBuilder(header1_).mergeFrom(value).buildPartial(); + } else { + header1_ = value; + } + + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + private void clearHeader1() { header1_ = null; + + } + + public static final int HEADER_2_FIELD_NUMBER = 3; + private com.icon.lightclient.v1.BlockUpdate header2_; + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + @java.lang.Override + public boolean hasHeader2() { + return header2_ != null; + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + @java.lang.Override + public com.icon.lightclient.v1.BlockUpdate getHeader2() { + return header2_ == null ? com.icon.lightclient.v1.BlockUpdate.getDefaultInstance() : header2_; + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + private void setHeader2(com.icon.lightclient.v1.BlockUpdate value) { + value.getClass(); + header2_ = value; + + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader2(com.icon.lightclient.v1.BlockUpdate value) { + value.getClass(); + if (header2_ != null && + header2_ != com.icon.lightclient.v1.BlockUpdate.getDefaultInstance()) { + header2_ = + com.icon.lightclient.v1.BlockUpdate.newBuilder(header2_).mergeFrom(value).buildPartial(); + } else { + header2_ = value; + } + + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + private void clearHeader2() { header2_ = null; + + } + + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.Misbehaviour parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.Misbehaviour parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.Misbehaviour parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.lightclient.v1.Misbehaviour prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.lightclient.v1.Misbehaviour} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.lightclient.v1.Misbehaviour, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.lightclient.v1.Misbehaviour) + com.icon.lightclient.v1.MisbehaviourOrBuilder { + // Construct using com.icon.lightclient.v1.Misbehaviour.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @return This builder for chaining. + */ + public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + @java.lang.Override + public boolean hasHeader1() { + return instance.hasHeader1(); + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + @java.lang.Override + public com.icon.lightclient.v1.BlockUpdate getHeader1() { + return instance.getHeader1(); + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + public Builder setHeader1(com.icon.lightclient.v1.BlockUpdate value) { + copyOnWrite(); + instance.setHeader1(value); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + public Builder setHeader1( + com.icon.lightclient.v1.BlockUpdate.Builder builderForValue) { + copyOnWrite(); + instance.setHeader1(builderForValue.build()); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + public Builder mergeHeader1(com.icon.lightclient.v1.BlockUpdate value) { + copyOnWrite(); + instance.mergeHeader1(value); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + */ + public Builder clearHeader1() { copyOnWrite(); + instance.clearHeader1(); + return this; + } + + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + @java.lang.Override + public boolean hasHeader2() { + return instance.hasHeader2(); + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + @java.lang.Override + public com.icon.lightclient.v1.BlockUpdate getHeader2() { + return instance.getHeader2(); + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + public Builder setHeader2(com.icon.lightclient.v1.BlockUpdate value) { + copyOnWrite(); + instance.setHeader2(value); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + public Builder setHeader2( + com.icon.lightclient.v1.BlockUpdate.Builder builderForValue) { + copyOnWrite(); + instance.setHeader2(builderForValue.build()); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + public Builder mergeHeader2(com.icon.lightclient.v1.BlockUpdate value) { + copyOnWrite(); + instance.mergeHeader2(value); + return this; + } + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + */ + public Builder clearHeader2() { copyOnWrite(); + instance.clearHeader2(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.lightclient.v1.Misbehaviour) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.lightclient.v1.Misbehaviour(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "header1_", + "header2_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\t" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.lightclient.v1.Misbehaviour.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.lightclient.v1.Misbehaviour) + private static final com.icon.lightclient.v1.Misbehaviour DEFAULT_INSTANCE; + static { + Misbehaviour defaultInstance = new Misbehaviour(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Misbehaviour.class, defaultInstance); + } + + public static com.icon.lightclient.v1.Misbehaviour getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/MisbehaviourOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/MisbehaviourOrBuilder.java new file mode 100644 index 000000000..4ae2a0811 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/MisbehaviourOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public interface MisbehaviourOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.lightclient.v1.Misbehaviour) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + java.lang.String getClientId(); + /** + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + * @return Whether the header1 field is set. + */ + boolean hasHeader1(); + /** + * .icon.lightclient.v1.BlockUpdate header_1 = 2 [json_name = "header1"]; + * @return The header1. + */ + com.icon.lightclient.v1.BlockUpdate getHeader1(); + + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + * @return Whether the header2 field is set. + */ + boolean hasHeader2(); + /** + * .icon.lightclient.v1.BlockUpdate header_2 = 3 [json_name = "header2"]; + * @return The header2. + */ + com.icon.lightclient.v1.BlockUpdate getHeader2(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevel.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevel.java new file mode 100644 index 000000000..f04dde697 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevel.java @@ -0,0 +1,294 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +/** + * Protobuf type {@code icon.lightclient.v1.TrustLevel} + */ +public final class TrustLevel extends + com.google.protobuf.GeneratedMessageLite< + TrustLevel, TrustLevel.Builder> implements + // @@protoc_insertion_point(message_implements:icon.lightclient.v1.TrustLevel) + TrustLevelOrBuilder { + private TrustLevel() { + } + public static final int NUMERATOR_FIELD_NUMBER = 1; + private long numerator_; + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + @java.lang.Override + public long getNumerator() { + return numerator_; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @param value The numerator to set. + */ + private void setNumerator(long value) { + + numerator_ = value; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + */ + private void clearNumerator() { + + numerator_ = 0L; + } + + public static final int DENOMINATOR_FIELD_NUMBER = 2; + private long denominator_; + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + @java.lang.Override + public long getDenominator() { + return denominator_; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @param value The denominator to set. + */ + private void setDenominator(long value) { + + denominator_ = value; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + */ + private void clearDenominator() { + + denominator_ = 0L; + } + + public static com.icon.lightclient.v1.TrustLevel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.TrustLevel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.TrustLevel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.lightclient.v1.TrustLevel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.lightclient.v1.TrustLevel prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.lightclient.v1.TrustLevel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.lightclient.v1.TrustLevel, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.lightclient.v1.TrustLevel) + com.icon.lightclient.v1.TrustLevelOrBuilder { + // Construct using com.icon.lightclient.v1.TrustLevel.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + @java.lang.Override + public long getNumerator() { + return instance.getNumerator(); + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @param value The numerator to set. + * @return This builder for chaining. + */ + public Builder setNumerator(long value) { + copyOnWrite(); + instance.setNumerator(value); + return this; + } + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return This builder for chaining. + */ + public Builder clearNumerator() { + copyOnWrite(); + instance.clearNumerator(); + return this; + } + + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + @java.lang.Override + public long getDenominator() { + return instance.getDenominator(); + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @param value The denominator to set. + * @return This builder for chaining. + */ + public Builder setDenominator(long value) { + copyOnWrite(); + instance.setDenominator(value); + return this; + } + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return This builder for chaining. + */ + public Builder clearDenominator() { + copyOnWrite(); + instance.clearDenominator(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.lightclient.v1.TrustLevel) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.lightclient.v1.TrustLevel(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "numerator_", + "denominator_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.lightclient.v1.TrustLevel.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.lightclient.v1.TrustLevel) + private static final com.icon.lightclient.v1.TrustLevel DEFAULT_INSTANCE; + static { + TrustLevel defaultInstance = new TrustLevel(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + TrustLevel.class, defaultInstance); + } + + public static com.icon.lightclient.v1.TrustLevel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevelOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevelOrBuilder.java new file mode 100644 index 000000000..ffcc7576d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/lightclient/v1/TrustLevelOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/lightclient/v1/light.proto + +package com.icon.lightclient.v1; + +public interface TrustLevelOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.lightclient.v1.TrustLevel) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 numerator = 1 [json_name = "numerator"]; + * @return The numerator. + */ + long getNumerator(); + + /** + * uint64 denominator = 2 [json_name = "denominator"]; + * @return The denominator. + */ + long getDenominator(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Channel.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Channel.java new file mode 100644 index 000000000..56db34aea --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Channel.java @@ -0,0 +1,3249 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +/** + *
+ * Channel defines pipeline for exactly-once packet delivery between specific
+ * modules on separate blockchains, which has at least one end capable of
+ * sending packets and one end capable of receiving packets.
+ * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel} + */ +public final class Channel extends + com.google.protobuf.GeneratedMessageLite< + Channel, Channel.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.channel.Channel) + ChannelOrBuilder { + private Channel() { + connectionHops_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + version_ = ""; + } + /** + *
+   * State defines if a channel is in one of the following states:
+   * CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED.
+   * 
+ * + * Protobuf enum {@code icon.proto.core.channel.Channel.State} + */ + public enum State + implements com.google.protobuf.Internal.EnumLite { + /** + *
+     * Default State
+     * 
+ * + * STATE_UNINITIALIZED_UNSPECIFIED = 0; + */ + STATE_UNINITIALIZED_UNSPECIFIED(0), + /** + *
+     * A channel has just started the opening handshake.
+     * 
+ * + * STATE_INIT = 1; + */ + STATE_INIT(1), + /** + *
+     * A channel has acknowledged the handshake step on the counterparty chain.
+     * 
+ * + * STATE_TRYOPEN = 2; + */ + STATE_TRYOPEN(2), + /** + *
+     * A channel has completed the handshake. Open channels are
+     * ready to send and receive packets.
+     * 
+ * + * STATE_OPEN = 3; + */ + STATE_OPEN(3), + /** + *
+     * A channel has been closed and can no longer be used to send or receive
+     * packets.
+     * 
+ * + * STATE_CLOSED = 4; + */ + STATE_CLOSED(4), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Default State
+     * 
+ * + * STATE_UNINITIALIZED_UNSPECIFIED = 0; + */ + public static final int STATE_UNINITIALIZED_UNSPECIFIED_VALUE = 0; + /** + *
+     * A channel has just started the opening handshake.
+     * 
+ * + * STATE_INIT = 1; + */ + public static final int STATE_INIT_VALUE = 1; + /** + *
+     * A channel has acknowledged the handshake step on the counterparty chain.
+     * 
+ * + * STATE_TRYOPEN = 2; + */ + public static final int STATE_TRYOPEN_VALUE = 2; + /** + *
+     * A channel has completed the handshake. Open channels are
+     * ready to send and receive packets.
+     * 
+ * + * STATE_OPEN = 3; + */ + public static final int STATE_OPEN_VALUE = 3; + /** + *
+     * A channel has been closed and can no longer be used to send or receive
+     * packets.
+     * 
+ * + * STATE_CLOSED = 4; + */ + public static final int STATE_CLOSED_VALUE = 4; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNINITIALIZED_UNSPECIFIED; + case 1: return STATE_INIT; + case 2: return STATE_TRYOPEN; + case 3: return STATE_OPEN; + case 4: return STATE_CLOSED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return StateVerifier.INSTANCE; + } + + private static final class StateVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new StateVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return State.forNumber(number) != null; + } + }; + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.proto.core.channel.Channel.State) + } + + /** + *
+   * Order defines if a channel is ORDERED or UNORDERED
+   * 
+ * + * Protobuf enum {@code icon.proto.core.channel.Channel.Order} + */ + public enum Order + implements com.google.protobuf.Internal.EnumLite { + /** + *
+     * zero-value for channel ordering
+     * 
+ * + * ORDER_NONE_UNSPECIFIED = 0; + */ + ORDER_NONE_UNSPECIFIED(0), + /** + *
+     * packets can be delivered in any order, which may differ from the order in
+     * which they were sent.
+     * 
+ * + * ORDER_UNORDERED = 1; + */ + ORDER_UNORDERED(1), + /** + *
+     * packets are delivered exactly in the order which they were sent
+     * 
+ * + * ORDER_ORDERED = 2; + */ + ORDER_ORDERED(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * zero-value for channel ordering
+     * 
+ * + * ORDER_NONE_UNSPECIFIED = 0; + */ + public static final int ORDER_NONE_UNSPECIFIED_VALUE = 0; + /** + *
+     * packets can be delivered in any order, which may differ from the order in
+     * which they were sent.
+     * 
+ * + * ORDER_UNORDERED = 1; + */ + public static final int ORDER_UNORDERED_VALUE = 1; + /** + *
+     * packets are delivered exactly in the order which they were sent
+     * 
+ * + * ORDER_ORDERED = 2; + */ + public static final int ORDER_ORDERED_VALUE = 2; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Order valueOf(int value) { + return forNumber(value); + } + + public static Order forNumber(int value) { + switch (value) { + case 0: return ORDER_NONE_UNSPECIFIED; + case 1: return ORDER_UNORDERED; + case 2: return ORDER_ORDERED; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Order> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public Order findValueByNumber(int number) { + return Order.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return OrderVerifier.INSTANCE; + } + + private static final class OrderVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new OrderVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return Order.forNumber(number) != null; + } + }; + + private final int value; + + private Order(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.proto.core.channel.Channel.Order) + } + + public interface CounterpartyOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.channel.Channel.Counterparty) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + java.lang.String getPortId(); + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + com.google.protobuf.ByteString + getPortIdBytes(); + + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + } + /** + *
+   * Counterparty defines a channel end counterparty
+   * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel.Counterparty} + */ + public static final class Counterparty extends + com.google.protobuf.GeneratedMessageLite< + Counterparty, Counterparty.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.channel.Channel.Counterparty) + CounterpartyOrBuilder { + private Counterparty() { + portId_ = ""; + channelId_ = ""; + } + public static final int PORT_ID_FIELD_NUMBER = 1; + private java.lang.String portId_; + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return portId_; + } + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(portId_); + } + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The portId to set. + */ + private void setPortId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + portId_ = value; + } + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + */ + private void clearPortId() { + + portId_ = getDefaultInstance().getPortId(); + } + /** + *
+     * port on the counterparty chain which owns the other end of the channel.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The bytes for portId to set. + */ + private void setPortIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + portId_ = value.toStringUtf8(); + + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 2; + private java.lang.String channelId_; + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return channelId_; + } + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(channelId_); + } + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The channelId to set. + */ + private void setChannelId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + channelId_ = value; + } + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + */ + private void clearChannelId() { + + channelId_ = getDefaultInstance().getChannelId(); + } + /** + *
+     * channel end on the counterparty chain
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + */ + private void setChannelIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + channelId_ = value.toStringUtf8(); + + } + + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.Counterparty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.channel.Channel.Counterparty prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+     * Counterparty defines a channel end counterparty
+     * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel.Counterparty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.channel.Channel.Counterparty, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.channel.Channel.Counterparty) + com.icon.proto.core.channel.Channel.CounterpartyOrBuilder { + // Construct using com.icon.proto.core.channel.Channel.Counterparty.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+       * port on the counterparty chain which owns the other end of the channel.
+       * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return instance.getPortId(); + } + /** + *
+       * port on the counterparty chain which owns the other end of the channel.
+       * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return instance.getPortIdBytes(); + } + /** + *
+       * port on the counterparty chain which owns the other end of the channel.
+       * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The portId to set. + * @return This builder for chaining. + */ + public Builder setPortId( + java.lang.String value) { + copyOnWrite(); + instance.setPortId(value); + return this; + } + /** + *
+       * port on the counterparty chain which owns the other end of the channel.
+       * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return This builder for chaining. + */ + public Builder clearPortId() { + copyOnWrite(); + instance.clearPortId(); + return this; + } + /** + *
+       * port on the counterparty chain which owns the other end of the channel.
+       * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The bytes for portId to set. + * @return This builder for chaining. + */ + public Builder setPortIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPortIdBytes(value); + return this; + } + + /** + *
+       * channel end on the counterparty chain
+       * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return instance.getChannelId(); + } + /** + *
+       * channel end on the counterparty chain
+       * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return instance.getChannelIdBytes(); + } + /** + *
+       * channel end on the counterparty chain
+       * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + copyOnWrite(); + instance.setChannelId(value); + return this; + } + /** + *
+       * channel end on the counterparty chain
+       * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + copyOnWrite(); + instance.clearChannelId(); + return this; + } + /** + *
+       * channel end on the counterparty chain
+       * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setChannelIdBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.channel.Channel.Counterparty) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.channel.Channel.Counterparty(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "portId_", + "channelId_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.channel.Channel.Counterparty.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.channel.Channel.Counterparty) + private static final com.icon.proto.core.channel.Channel.Counterparty DEFAULT_INSTANCE; + static { + Counterparty defaultInstance = new Counterparty(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Counterparty.class, defaultInstance); + } + + public static com.icon.proto.core.channel.Channel.Counterparty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } + } + + public interface IdentifiedChannelOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.channel.Channel.IdentifiedChannel) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + com.icon.proto.core.channel.Channel.State getState(); + + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + int getOrderingValue(); + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + com.icon.proto.core.channel.Channel.Order getOrdering(); + + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + * @return Whether the counterparty field is set. + */ + boolean hasCounterparty(); + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + * @return The counterparty. + */ + com.icon.proto.core.channel.Channel.Counterparty getCounterparty(); + + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + java.util.List + getConnectionHopsList(); + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + int getConnectionHopsCount(); + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + java.lang.String getConnectionHops(int index); + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + com.google.protobuf.ByteString + getConnectionHopsBytes(int index); + + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The portId. + */ + java.lang.String getPortId(); + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The bytes for portId. + */ + com.google.protobuf.ByteString + getPortIdBytes(); + + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + } + /** + *
+   * IdentifiedChannel defines a channel with additional port and channel
+   * identifier fields.
+   * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel.IdentifiedChannel} + */ + public static final class IdentifiedChannel extends + com.google.protobuf.GeneratedMessageLite< + IdentifiedChannel, IdentifiedChannel.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.channel.Channel.IdentifiedChannel) + IdentifiedChannelOrBuilder { + private IdentifiedChannel() { + connectionHops_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + version_ = ""; + portId_ = ""; + channelId_ = ""; + } + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.State getState() { + com.icon.proto.core.channel.Channel.State result = com.icon.proto.core.channel.Channel.State.forNumber(state_); + return result == null ? com.icon.proto.core.channel.Channel.State.UNRECOGNIZED : result; + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + */ + private void setStateValue(int value) { + state_ = value; + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The state to set. + */ + private void setState(com.icon.proto.core.channel.Channel.State value) { + state_ = value.getNumber(); + + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + */ + private void clearState() { + + state_ = 0; + } + + public static final int ORDERING_FIELD_NUMBER = 2; + private int ordering_; + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + @java.lang.Override + public int getOrderingValue() { + return ordering_; + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Order getOrdering() { + com.icon.proto.core.channel.Channel.Order result = com.icon.proto.core.channel.Channel.Order.forNumber(ordering_); + return result == null ? com.icon.proto.core.channel.Channel.Order.UNRECOGNIZED : result; + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The enum numeric value on the wire for ordering to set. + */ + private void setOrderingValue(int value) { + ordering_ = value; + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The ordering to set. + */ + private void setOrdering(com.icon.proto.core.channel.Channel.Order value) { + ordering_ = value.getNumber(); + + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + */ + private void clearOrdering() { + + ordering_ = 0; + } + + public static final int COUNTERPARTY_FIELD_NUMBER = 3; + private com.icon.proto.core.channel.Channel.Counterparty counterparty_; + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return counterparty_ != null; + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Counterparty getCounterparty() { + return counterparty_ == null ? com.icon.proto.core.channel.Channel.Counterparty.getDefaultInstance() : counterparty_; + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + private void setCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + value.getClass(); + counterparty_ = value; + + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + value.getClass(); + if (counterparty_ != null && + counterparty_ != com.icon.proto.core.channel.Channel.Counterparty.getDefaultInstance()) { + counterparty_ = + com.icon.proto.core.channel.Channel.Counterparty.newBuilder(counterparty_).mergeFrom(value).buildPartial(); + } else { + counterparty_ = value; + } + + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + private void clearCounterparty() { counterparty_ = null; + + } + + public static final int CONNECTION_HOPS_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList connectionHops_; + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + @java.lang.Override + public java.util.List getConnectionHopsList() { + return connectionHops_; + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + @java.lang.Override + public int getConnectionHopsCount() { + return connectionHops_.size(); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + @java.lang.Override + public java.lang.String getConnectionHops(int index) { + return connectionHops_.get(index); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the value to return. + * @return The bytes of the connectionHops at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionHopsBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + connectionHops_.get(index)); + } + private void ensureConnectionHopsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + connectionHops_; if (!tmp.isModifiable()) { + connectionHops_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index to set the value at. + * @param value The connectionHops to set. + */ + private void setConnectionHops( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureConnectionHopsIsMutable(); + connectionHops_.set(index, value); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The connectionHops to add. + */ + private void addConnectionHops( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureConnectionHopsIsMutable(); + connectionHops_.add(value); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param values The connectionHops to add. + */ + private void addAllConnectionHops( + java.lang.Iterable values) { + ensureConnectionHopsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, connectionHops_); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + */ + private void clearConnectionHops() { + connectionHops_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The bytes of the connectionHops to add. + */ + private void addConnectionHopsBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureConnectionHopsIsMutable(); + connectionHops_.add(value.toStringUtf8()); + } + + public static final int VERSION_FIELD_NUMBER = 5; + private java.lang.String version_; + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + return version_; + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(version_); + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The version to set. + */ + private void setVersion( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + version_ = value; + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + */ + private void clearVersion() { + + version_ = getDefaultInstance().getVersion(); + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The bytes for version to set. + */ + private void setVersionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + version_ = value.toStringUtf8(); + + } + + public static final int PORT_ID_FIELD_NUMBER = 6; + private java.lang.String portId_; + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return portId_; + } + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(portId_); + } + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @param value The portId to set. + */ + private void setPortId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + portId_ = value; + } + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + */ + private void clearPortId() { + + portId_ = getDefaultInstance().getPortId(); + } + /** + *
+     * port identifier
+     * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @param value The bytes for portId to set. + */ + private void setPortIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + portId_ = value.toStringUtf8(); + + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 7; + private java.lang.String channelId_; + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return channelId_; + } + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(channelId_); + } + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @param value The channelId to set. + */ + private void setChannelId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + channelId_ = value; + } + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + */ + private void clearChannelId() { + + channelId_ = getDefaultInstance().getChannelId(); + } + /** + *
+     * channel identifier
+     * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + */ + private void setChannelIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + channelId_ = value.toStringUtf8(); + + } + + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel.IdentifiedChannel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.channel.Channel.IdentifiedChannel prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+     * IdentifiedChannel defines a channel with additional port and channel
+     * identifier fields.
+     * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel.IdentifiedChannel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.channel.Channel.IdentifiedChannel, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.channel.Channel.IdentifiedChannel) + com.icon.proto.core.channel.Channel.IdentifiedChannelOrBuilder { + // Construct using com.icon.proto.core.channel.Channel.IdentifiedChannel.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+       * current state of the channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return instance.getStateValue(); + } + /** + *
+       * current state of the channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + copyOnWrite(); + instance.setStateValue(value); + return this; + } + /** + *
+       * current state of the channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.State getState() { + return instance.getState(); + } + /** + *
+       * current state of the channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setState(com.icon.proto.core.channel.Channel.State value) { + copyOnWrite(); + instance.setState(value); + return this; + } + /** + *
+       * current state of the channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + copyOnWrite(); + instance.clearState(); + return this; + } + + /** + *
+       * whether the channel is ordered or unordered
+       * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + @java.lang.Override + public int getOrderingValue() { + return instance.getOrderingValue(); + } + /** + *
+       * whether the channel is ordered or unordered
+       * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The ordering to set. + * @return This builder for chaining. + */ + public Builder setOrderingValue(int value) { + copyOnWrite(); + instance.setOrderingValue(value); + return this; + } + /** + *
+       * whether the channel is ordered or unordered
+       * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Order getOrdering() { + return instance.getOrdering(); + } + /** + *
+       * whether the channel is ordered or unordered
+       * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The enum numeric value on the wire for ordering to set. + * @return This builder for chaining. + */ + public Builder setOrdering(com.icon.proto.core.channel.Channel.Order value) { + copyOnWrite(); + instance.setOrdering(value); + return this; + } + /** + *
+       * whether the channel is ordered or unordered
+       * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return This builder for chaining. + */ + public Builder clearOrdering() { + copyOnWrite(); + instance.clearOrdering(); + return this; + } + + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return instance.hasCounterparty(); + } + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Counterparty getCounterparty() { + return instance.getCounterparty(); + } + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder setCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + copyOnWrite(); + instance.setCounterparty(value); + return this; + } + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder setCounterparty( + com.icon.proto.core.channel.Channel.Counterparty.Builder builderForValue) { + copyOnWrite(); + instance.setCounterparty(builderForValue.build()); + return this; + } + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder mergeCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + copyOnWrite(); + instance.mergeCounterparty(value); + return this; + } + /** + *
+       * counterparty channel end
+       * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder clearCounterparty() { copyOnWrite(); + instance.clearCounterparty(); + return this; + } + + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + @java.lang.Override + public java.util.List + getConnectionHopsList() { + return java.util.Collections.unmodifiableList( + instance.getConnectionHopsList()); + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + @java.lang.Override + public int getConnectionHopsCount() { + return instance.getConnectionHopsCount(); + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + @java.lang.Override + public java.lang.String getConnectionHops(int index) { + return instance.getConnectionHops(index); + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the value to return. + * @return The bytes of the connectionHops at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionHopsBytes(int index) { + return instance.getConnectionHopsBytes(index); + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index to set the value at. + * @param value The connectionHops to set. + * @return This builder for chaining. + */ + public Builder setConnectionHops( + int index, java.lang.String value) { + copyOnWrite(); + instance.setConnectionHops(index, value); + return this; + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The connectionHops to add. + * @return This builder for chaining. + */ + public Builder addConnectionHops( + java.lang.String value) { + copyOnWrite(); + instance.addConnectionHops(value); + return this; + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param values The connectionHops to add. + * @return This builder for chaining. + */ + public Builder addAllConnectionHops( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllConnectionHops(values); + return this; + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return This builder for chaining. + */ + public Builder clearConnectionHops() { + copyOnWrite(); + instance.clearConnectionHops(); + return this; + } + /** + *
+       * list of connection identifiers, in order, along which packets sent on
+       * this channel will travel
+       * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The bytes of the connectionHops to add. + * @return This builder for chaining. + */ + public Builder addConnectionHopsBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addConnectionHopsBytes(value); + return this; + } + + /** + *
+       * opaque channel version, which is agreed upon during the handshake
+       * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + return instance.getVersion(); + } + /** + *
+       * opaque channel version, which is agreed upon during the handshake
+       * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + return instance.getVersionBytes(); + } + /** + *
+       * opaque channel version, which is agreed upon during the handshake
+       * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + copyOnWrite(); + instance.setVersion(value); + return this; + } + /** + *
+       * opaque channel version, which is agreed upon during the handshake
+       * 
+ * + * string version = 5 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + copyOnWrite(); + instance.clearVersion(); + return this; + } + /** + *
+       * opaque channel version, which is agreed upon during the handshake
+       * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setVersionBytes(value); + return this; + } + + /** + *
+       * port identifier
+       * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return instance.getPortId(); + } + /** + *
+       * port identifier
+       * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return instance.getPortIdBytes(); + } + /** + *
+       * port identifier
+       * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @param value The portId to set. + * @return This builder for chaining. + */ + public Builder setPortId( + java.lang.String value) { + copyOnWrite(); + instance.setPortId(value); + return this; + } + /** + *
+       * port identifier
+       * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @return This builder for chaining. + */ + public Builder clearPortId() { + copyOnWrite(); + instance.clearPortId(); + return this; + } + /** + *
+       * port identifier
+       * 
+ * + * string port_id = 6 [json_name = "portId"]; + * @param value The bytes for portId to set. + * @return This builder for chaining. + */ + public Builder setPortIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPortIdBytes(value); + return this; + } + + /** + *
+       * channel identifier
+       * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return instance.getChannelId(); + } + /** + *
+       * channel identifier
+       * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return instance.getChannelIdBytes(); + } + /** + *
+       * channel identifier
+       * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + copyOnWrite(); + instance.setChannelId(value); + return this; + } + /** + *
+       * channel identifier
+       * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + copyOnWrite(); + instance.clearChannelId(); + return this; + } + /** + *
+       * channel identifier
+       * 
+ * + * string channel_id = 7 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setChannelIdBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.channel.Channel.IdentifiedChannel) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.channel.Channel.IdentifiedChannel(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "state_", + "ordering_", + "counterparty_", + "connectionHops_", + "version_", + "portId_", + "channelId_", + }; + java.lang.String info = + "\u0000\u0007\u0000\u0000\u0001\u0007\u0007\u0000\u0001\u0000\u0001\f\u0002\f\u0003" + + "\t\u0004\u021a\u0005\u0208\u0006\u0208\u0007\u0208"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.channel.Channel.IdentifiedChannel.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.channel.Channel.IdentifiedChannel) + private static final com.icon.proto.core.channel.Channel.IdentifiedChannel DEFAULT_INSTANCE; + static { + IdentifiedChannel defaultInstance = new IdentifiedChannel(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + IdentifiedChannel.class, defaultInstance); + } + + public static com.icon.proto.core.channel.Channel.IdentifiedChannel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_; + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.State getState() { + com.icon.proto.core.channel.Channel.State result = com.icon.proto.core.channel.Channel.State.forNumber(state_); + return result == null ? com.icon.proto.core.channel.Channel.State.UNRECOGNIZED : result; + } + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + */ + private void setStateValue(int value) { + state_ = value; + } + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The state to set. + */ + private void setState(com.icon.proto.core.channel.Channel.State value) { + state_ = value.getNumber(); + + } + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + */ + private void clearState() { + + state_ = 0; + } + + public static final int ORDERING_FIELD_NUMBER = 2; + private int ordering_; + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + @java.lang.Override + public int getOrderingValue() { + return ordering_; + } + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Order getOrdering() { + com.icon.proto.core.channel.Channel.Order result = com.icon.proto.core.channel.Channel.Order.forNumber(ordering_); + return result == null ? com.icon.proto.core.channel.Channel.Order.UNRECOGNIZED : result; + } + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The enum numeric value on the wire for ordering to set. + */ + private void setOrderingValue(int value) { + ordering_ = value; + } + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The ordering to set. + */ + private void setOrdering(com.icon.proto.core.channel.Channel.Order value) { + ordering_ = value.getNumber(); + + } + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + */ + private void clearOrdering() { + + ordering_ = 0; + } + + public static final int COUNTERPARTY_FIELD_NUMBER = 3; + private com.icon.proto.core.channel.Channel.Counterparty counterparty_; + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return counterparty_ != null; + } + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Counterparty getCounterparty() { + return counterparty_ == null ? com.icon.proto.core.channel.Channel.Counterparty.getDefaultInstance() : counterparty_; + } + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + private void setCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + value.getClass(); + counterparty_ = value; + + } + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + value.getClass(); + if (counterparty_ != null && + counterparty_ != com.icon.proto.core.channel.Channel.Counterparty.getDefaultInstance()) { + counterparty_ = + com.icon.proto.core.channel.Channel.Counterparty.newBuilder(counterparty_).mergeFrom(value).buildPartial(); + } else { + counterparty_ = value; + } + + } + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + private void clearCounterparty() { counterparty_ = null; + + } + + public static final int CONNECTION_HOPS_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList connectionHops_; + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + @java.lang.Override + public java.util.List getConnectionHopsList() { + return connectionHops_; + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + @java.lang.Override + public int getConnectionHopsCount() { + return connectionHops_.size(); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + @java.lang.Override + public java.lang.String getConnectionHops(int index) { + return connectionHops_.get(index); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the value to return. + * @return The bytes of the connectionHops at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionHopsBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + connectionHops_.get(index)); + } + private void ensureConnectionHopsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + connectionHops_; if (!tmp.isModifiable()) { + connectionHops_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index to set the value at. + * @param value The connectionHops to set. + */ + private void setConnectionHops( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureConnectionHopsIsMutable(); + connectionHops_.set(index, value); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The connectionHops to add. + */ + private void addConnectionHops( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureConnectionHopsIsMutable(); + connectionHops_.add(value); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param values The connectionHops to add. + */ + private void addAllConnectionHops( + java.lang.Iterable values) { + ensureConnectionHopsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, connectionHops_); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + */ + private void clearConnectionHops() { + connectionHops_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The bytes of the connectionHops to add. + */ + private void addConnectionHopsBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureConnectionHopsIsMutable(); + connectionHops_.add(value.toStringUtf8()); + } + + public static final int VERSION_FIELD_NUMBER = 5; + private java.lang.String version_; + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + return version_; + } + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(version_); + } + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The version to set. + */ + private void setVersion( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + version_ = value; + } + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + */ + private void clearVersion() { + + version_ = getDefaultInstance().getVersion(); + } + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The bytes for version to set. + */ + private void setVersionBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + version_ = value.toStringUtf8(); + + } + + public static com.icon.proto.core.channel.Channel parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Channel parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Channel parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Channel parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.channel.Channel prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Channel defines pipeline for exactly-once packet delivery between specific
+   * modules on separate blockchains, which has at least one end capable of
+   * sending packets and one end capable of receiving packets.
+   * 
+ * + * Protobuf type {@code icon.proto.core.channel.Channel} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.channel.Channel, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.channel.Channel) + com.icon.proto.core.channel.ChannelOrBuilder { + // Construct using com.icon.proto.core.channel.Channel.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return instance.getStateValue(); + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + copyOnWrite(); + instance.setStateValue(value); + return this; + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.State getState() { + return instance.getState(); + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setState(com.icon.proto.core.channel.Channel.State value) { + copyOnWrite(); + instance.setState(value); + return this; + } + /** + *
+     * current state of the channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + copyOnWrite(); + instance.clearState(); + return this; + } + + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + @java.lang.Override + public int getOrderingValue() { + return instance.getOrderingValue(); + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The ordering to set. + * @return This builder for chaining. + */ + public Builder setOrderingValue(int value) { + copyOnWrite(); + instance.setOrderingValue(value); + return this; + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Order getOrdering() { + return instance.getOrdering(); + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @param value The enum numeric value on the wire for ordering to set. + * @return This builder for chaining. + */ + public Builder setOrdering(com.icon.proto.core.channel.Channel.Order value) { + copyOnWrite(); + instance.setOrdering(value); + return this; + } + /** + *
+     * whether the channel is ordered or unordered
+     * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return This builder for chaining. + */ + public Builder clearOrdering() { + copyOnWrite(); + instance.clearOrdering(); + return this; + } + + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return instance.hasCounterparty(); + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.channel.Channel.Counterparty getCounterparty() { + return instance.getCounterparty(); + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder setCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + copyOnWrite(); + instance.setCounterparty(value); + return this; + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder setCounterparty( + com.icon.proto.core.channel.Channel.Counterparty.Builder builderForValue) { + copyOnWrite(); + instance.setCounterparty(builderForValue.build()); + return this; + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder mergeCounterparty(com.icon.proto.core.channel.Channel.Counterparty value) { + copyOnWrite(); + instance.mergeCounterparty(value); + return this; + } + /** + *
+     * counterparty channel end
+     * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + */ + public Builder clearCounterparty() { copyOnWrite(); + instance.clearCounterparty(); + return this; + } + + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + @java.lang.Override + public java.util.List + getConnectionHopsList() { + return java.util.Collections.unmodifiableList( + instance.getConnectionHopsList()); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + @java.lang.Override + public int getConnectionHopsCount() { + return instance.getConnectionHopsCount(); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + @java.lang.Override + public java.lang.String getConnectionHops(int index) { + return instance.getConnectionHops(index); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the value to return. + * @return The bytes of the connectionHops at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionHopsBytes(int index) { + return instance.getConnectionHopsBytes(index); + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index to set the value at. + * @param value The connectionHops to set. + * @return This builder for chaining. + */ + public Builder setConnectionHops( + int index, java.lang.String value) { + copyOnWrite(); + instance.setConnectionHops(index, value); + return this; + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The connectionHops to add. + * @return This builder for chaining. + */ + public Builder addConnectionHops( + java.lang.String value) { + copyOnWrite(); + instance.addConnectionHops(value); + return this; + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param values The connectionHops to add. + * @return This builder for chaining. + */ + public Builder addAllConnectionHops( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllConnectionHops(values); + return this; + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return This builder for chaining. + */ + public Builder clearConnectionHops() { + copyOnWrite(); + instance.clearConnectionHops(); + return this; + } + /** + *
+     * list of connection identifiers, in order, along which packets sent on
+     * this channel will travel
+     * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param value The bytes of the connectionHops to add. + * @return This builder for chaining. + */ + public Builder addConnectionHopsBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addConnectionHopsBytes(value); + return this; + } + + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + @java.lang.Override + public java.lang.String getVersion() { + return instance.getVersion(); + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVersionBytes() { + return instance.getVersionBytes(); + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion( + java.lang.String value) { + copyOnWrite(); + instance.setVersion(value); + return this; + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @return This builder for chaining. + */ + public Builder clearVersion() { + copyOnWrite(); + instance.clearVersion(); + return this; + } + /** + *
+     * opaque channel version, which is agreed upon during the handshake
+     * 
+ * + * string version = 5 [json_name = "version"]; + * @param value The bytes for version to set. + * @return This builder for chaining. + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setVersionBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.channel.Channel) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.channel.Channel(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "state_", + "ordering_", + "counterparty_", + "connectionHops_", + "version_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0001\u0000\u0001\f\u0002\f\u0003" + + "\t\u0004\u021a\u0005\u0208"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.channel.Channel.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.channel.Channel) + private static final com.icon.proto.core.channel.Channel DEFAULT_INSTANCE; + static { + Channel defaultInstance = new Channel(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Channel.class, defaultInstance); + } + + public static com.icon.proto.core.channel.Channel getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelOrBuilder.java new file mode 100644 index 000000000..986c71a2d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelOrBuilder.java @@ -0,0 +1,131 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +public interface ChannelOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.channel.Channel) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * current state of the channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.State state = 1 [json_name = "state"]; + * @return The state. + */ + com.icon.proto.core.channel.Channel.State getState(); + + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The enum numeric value on the wire for ordering. + */ + int getOrderingValue(); + /** + *
+   * whether the channel is ordered or unordered
+   * 
+ * + * .icon.proto.core.channel.Channel.Order ordering = 2 [json_name = "ordering"]; + * @return The ordering. + */ + com.icon.proto.core.channel.Channel.Order getOrdering(); + + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + * @return Whether the counterparty field is set. + */ + boolean hasCounterparty(); + /** + *
+   * counterparty channel end
+   * 
+ * + * .icon.proto.core.channel.Channel.Counterparty counterparty = 3 [json_name = "counterparty"]; + * @return The counterparty. + */ + com.icon.proto.core.channel.Channel.Counterparty getCounterparty(); + + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return A list containing the connectionHops. + */ + java.util.List + getConnectionHopsList(); + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @return The count of connectionHops. + */ + int getConnectionHopsCount(); + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + java.lang.String getConnectionHops(int index); + /** + *
+   * list of connection identifiers, in order, along which packets sent on
+   * this channel will travel
+   * 
+ * + * repeated string connection_hops = 4 [json_name = "connectionHops"]; + * @param index The index of the element to return. + * @return The connectionHops at the given index. + */ + com.google.protobuf.ByteString + getConnectionHopsBytes(int index); + + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The version. + */ + java.lang.String getVersion(); + /** + *
+   * opaque channel version, which is agreed upon during the handshake
+   * 
+ * + * string version = 5 [json_name = "version"]; + * @return The bytes for version. + */ + com.google.protobuf.ByteString + getVersionBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelProto.java new file mode 100644 index 000000000..1b9e669f3 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/ChannelProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +public final class ChannelProto { + private ChannelProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Packet.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Packet.java new file mode 100644 index 000000000..17d0872ef --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/Packet.java @@ -0,0 +1,1133 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +/** + *
+ * Packet defines a type that carries data across different chains through IBC
+ * 
+ * + * Protobuf type {@code icon.proto.core.channel.Packet} + */ +public final class Packet extends + com.google.protobuf.GeneratedMessageLite< + Packet, Packet.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.channel.Packet) + PacketOrBuilder { + private Packet() { + sourcePort_ = ""; + sourceChannel_ = ""; + destinationPort_ = ""; + destinationChannel_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int SEQUENCE_FIELD_NUMBER = 1; + private long sequence_; + /** + *
+   * number corresponds to the order of sends and receives, where a Packet
+   * with an earlier sequence number must be sent and received before a Packet
+   * with a later sequence number.
+   * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return sequence_; + } + /** + *
+   * number corresponds to the order of sends and receives, where a Packet
+   * with an earlier sequence number must be sent and received before a Packet
+   * with a later sequence number.
+   * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @param value The sequence to set. + */ + private void setSequence(long value) { + + sequence_ = value; + } + /** + *
+   * number corresponds to the order of sends and receives, where a Packet
+   * with an earlier sequence number must be sent and received before a Packet
+   * with a later sequence number.
+   * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + */ + private void clearSequence() { + + sequence_ = 0L; + } + + public static final int SOURCE_PORT_FIELD_NUMBER = 2; + private java.lang.String sourcePort_; + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The sourcePort. + */ + @java.lang.Override + public java.lang.String getSourcePort() { + return sourcePort_; + } + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The bytes for sourcePort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourcePortBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(sourcePort_); + } + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @param value The sourcePort to set. + */ + private void setSourcePort( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + sourcePort_ = value; + } + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + */ + private void clearSourcePort() { + + sourcePort_ = getDefaultInstance().getSourcePort(); + } + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @param value The bytes for sourcePort to set. + */ + private void setSourcePortBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + sourcePort_ = value.toStringUtf8(); + + } + + public static final int SOURCE_CHANNEL_FIELD_NUMBER = 3; + private java.lang.String sourceChannel_; + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The sourceChannel. + */ + @java.lang.Override + public java.lang.String getSourceChannel() { + return sourceChannel_; + } + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The bytes for sourceChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceChannelBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(sourceChannel_); + } + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @param value The sourceChannel to set. + */ + private void setSourceChannel( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + sourceChannel_ = value; + } + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + */ + private void clearSourceChannel() { + + sourceChannel_ = getDefaultInstance().getSourceChannel(); + } + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @param value The bytes for sourceChannel to set. + */ + private void setSourceChannelBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + sourceChannel_ = value.toStringUtf8(); + + } + + public static final int DESTINATION_PORT_FIELD_NUMBER = 4; + private java.lang.String destinationPort_; + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The destinationPort. + */ + @java.lang.Override + public java.lang.String getDestinationPort() { + return destinationPort_; + } + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The bytes for destinationPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationPortBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(destinationPort_); + } + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @param value The destinationPort to set. + */ + private void setDestinationPort( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + destinationPort_ = value; + } + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + */ + private void clearDestinationPort() { + + destinationPort_ = getDefaultInstance().getDestinationPort(); + } + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @param value The bytes for destinationPort to set. + */ + private void setDestinationPortBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + destinationPort_ = value.toStringUtf8(); + + } + + public static final int DESTINATION_CHANNEL_FIELD_NUMBER = 5; + private java.lang.String destinationChannel_; + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The destinationChannel. + */ + @java.lang.Override + public java.lang.String getDestinationChannel() { + return destinationChannel_; + } + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The bytes for destinationChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationChannelBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(destinationChannel_); + } + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @param value The destinationChannel to set. + */ + private void setDestinationChannel( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + destinationChannel_ = value; + } + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + */ + private void clearDestinationChannel() { + + destinationChannel_ = getDefaultInstance().getDestinationChannel(); + } + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @param value The bytes for destinationChannel to set. + */ + private void setDestinationChannelBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + destinationChannel_ = value.toStringUtf8(); + + } + + public static final int DATA_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString data_; + /** + *
+   * actual opaque bytes transferred directly to the application module
+   * 
+ * + * bytes data = 6 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+   * actual opaque bytes transferred directly to the application module
+   * 
+ * + * bytes data = 6 [json_name = "data"]; + * @param value The data to set. + */ + private void setData(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + data_ = value; + } + /** + *
+   * actual opaque bytes transferred directly to the application module
+   * 
+ * + * bytes data = 6 [json_name = "data"]; + */ + private void clearData() { + + data_ = getDefaultInstance().getData(); + } + + public static final int TIMEOUT_HEIGHT_FIELD_NUMBER = 7; + private com.icon.proto.core.client.Height timeoutHeight_; + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + @java.lang.Override + public boolean hasTimeoutHeight() { + return timeoutHeight_ != null; + } + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + @java.lang.Override + public com.icon.proto.core.client.Height getTimeoutHeight() { + return timeoutHeight_ == null ? com.icon.proto.core.client.Height.getDefaultInstance() : timeoutHeight_; + } + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + private void setTimeoutHeight(com.icon.proto.core.client.Height value) { + value.getClass(); + timeoutHeight_ = value; + + } + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTimeoutHeight(com.icon.proto.core.client.Height value) { + value.getClass(); + if (timeoutHeight_ != null && + timeoutHeight_ != com.icon.proto.core.client.Height.getDefaultInstance()) { + timeoutHeight_ = + com.icon.proto.core.client.Height.newBuilder(timeoutHeight_).mergeFrom(value).buildPartial(); + } else { + timeoutHeight_ = value; + } + + } + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + private void clearTimeoutHeight() { timeoutHeight_ = null; + + } + + public static final int TIMEOUT_TIMESTAMP_FIELD_NUMBER = 8; + private long timeoutTimestamp_; + /** + *
+   * block timestamp (in nanoseconds) after which the packet times out
+   * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @return The timeoutTimestamp. + */ + @java.lang.Override + public long getTimeoutTimestamp() { + return timeoutTimestamp_; + } + /** + *
+   * block timestamp (in nanoseconds) after which the packet times out
+   * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @param value The timeoutTimestamp to set. + */ + private void setTimeoutTimestamp(long value) { + + timeoutTimestamp_ = value; + } + /** + *
+   * block timestamp (in nanoseconds) after which the packet times out
+   * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + */ + private void clearTimeoutTimestamp() { + + timeoutTimestamp_ = 0L; + } + + public static com.icon.proto.core.channel.Packet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Packet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Packet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Packet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Packet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.Packet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.Packet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Packet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Packet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Packet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.Packet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.Packet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.channel.Packet prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Packet defines a type that carries data across different chains through IBC
+   * 
+ * + * Protobuf type {@code icon.proto.core.channel.Packet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.channel.Packet, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.channel.Packet) + com.icon.proto.core.channel.PacketOrBuilder { + // Construct using com.icon.proto.core.channel.Packet.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * number corresponds to the order of sends and receives, where a Packet
+     * with an earlier sequence number must be sent and received before a Packet
+     * with a later sequence number.
+     * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return instance.getSequence(); + } + /** + *
+     * number corresponds to the order of sends and receives, where a Packet
+     * with an earlier sequence number must be sent and received before a Packet
+     * with a later sequence number.
+     * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @param value The sequence to set. + * @return This builder for chaining. + */ + public Builder setSequence(long value) { + copyOnWrite(); + instance.setSequence(value); + return this; + } + /** + *
+     * number corresponds to the order of sends and receives, where a Packet
+     * with an earlier sequence number must be sent and received before a Packet
+     * with a later sequence number.
+     * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @return This builder for chaining. + */ + public Builder clearSequence() { + copyOnWrite(); + instance.clearSequence(); + return this; + } + + /** + *
+     * identifies the port on the sending chain.
+     * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The sourcePort. + */ + @java.lang.Override + public java.lang.String getSourcePort() { + return instance.getSourcePort(); + } + /** + *
+     * identifies the port on the sending chain.
+     * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The bytes for sourcePort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourcePortBytes() { + return instance.getSourcePortBytes(); + } + /** + *
+     * identifies the port on the sending chain.
+     * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @param value The sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePort( + java.lang.String value) { + copyOnWrite(); + instance.setSourcePort(value); + return this; + } + /** + *
+     * identifies the port on the sending chain.
+     * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return This builder for chaining. + */ + public Builder clearSourcePort() { + copyOnWrite(); + instance.clearSourcePort(); + return this; + } + /** + *
+     * identifies the port on the sending chain.
+     * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @param value The bytes for sourcePort to set. + * @return This builder for chaining. + */ + public Builder setSourcePortBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSourcePortBytes(value); + return this; + } + + /** + *
+     * identifies the channel end on the sending chain.
+     * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The sourceChannel. + */ + @java.lang.Override + public java.lang.String getSourceChannel() { + return instance.getSourceChannel(); + } + /** + *
+     * identifies the channel end on the sending chain.
+     * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The bytes for sourceChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSourceChannelBytes() { + return instance.getSourceChannelBytes(); + } + /** + *
+     * identifies the channel end on the sending chain.
+     * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @param value The sourceChannel to set. + * @return This builder for chaining. + */ + public Builder setSourceChannel( + java.lang.String value) { + copyOnWrite(); + instance.setSourceChannel(value); + return this; + } + /** + *
+     * identifies the channel end on the sending chain.
+     * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return This builder for chaining. + */ + public Builder clearSourceChannel() { + copyOnWrite(); + instance.clearSourceChannel(); + return this; + } + /** + *
+     * identifies the channel end on the sending chain.
+     * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @param value The bytes for sourceChannel to set. + * @return This builder for chaining. + */ + public Builder setSourceChannelBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSourceChannelBytes(value); + return this; + } + + /** + *
+     * identifies the port on the receiving chain.
+     * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The destinationPort. + */ + @java.lang.Override + public java.lang.String getDestinationPort() { + return instance.getDestinationPort(); + } + /** + *
+     * identifies the port on the receiving chain.
+     * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The bytes for destinationPort. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationPortBytes() { + return instance.getDestinationPortBytes(); + } + /** + *
+     * identifies the port on the receiving chain.
+     * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @param value The destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPort( + java.lang.String value) { + copyOnWrite(); + instance.setDestinationPort(value); + return this; + } + /** + *
+     * identifies the port on the receiving chain.
+     * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return This builder for chaining. + */ + public Builder clearDestinationPort() { + copyOnWrite(); + instance.clearDestinationPort(); + return this; + } + /** + *
+     * identifies the port on the receiving chain.
+     * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @param value The bytes for destinationPort to set. + * @return This builder for chaining. + */ + public Builder setDestinationPortBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDestinationPortBytes(value); + return this; + } + + /** + *
+     * identifies the channel end on the receiving chain.
+     * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The destinationChannel. + */ + @java.lang.Override + public java.lang.String getDestinationChannel() { + return instance.getDestinationChannel(); + } + /** + *
+     * identifies the channel end on the receiving chain.
+     * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The bytes for destinationChannel. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDestinationChannelBytes() { + return instance.getDestinationChannelBytes(); + } + /** + *
+     * identifies the channel end on the receiving chain.
+     * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @param value The destinationChannel to set. + * @return This builder for chaining. + */ + public Builder setDestinationChannel( + java.lang.String value) { + copyOnWrite(); + instance.setDestinationChannel(value); + return this; + } + /** + *
+     * identifies the channel end on the receiving chain.
+     * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return This builder for chaining. + */ + public Builder clearDestinationChannel() { + copyOnWrite(); + instance.clearDestinationChannel(); + return this; + } + /** + *
+     * identifies the channel end on the receiving chain.
+     * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @param value The bytes for destinationChannel to set. + * @return This builder for chaining. + */ + public Builder setDestinationChannelBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDestinationChannelBytes(value); + return this; + } + + /** + *
+     * actual opaque bytes transferred directly to the application module
+     * 
+ * + * bytes data = 6 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return instance.getData(); + } + /** + *
+     * actual opaque bytes transferred directly to the application module
+     * 
+ * + * bytes data = 6 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setData(value); + return this; + } + /** + *
+     * actual opaque bytes transferred directly to the application module
+     * 
+ * + * bytes data = 6 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + copyOnWrite(); + instance.clearData(); + return this; + } + + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + @java.lang.Override + public boolean hasTimeoutHeight() { + return instance.hasTimeoutHeight(); + } + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + @java.lang.Override + public com.icon.proto.core.client.Height getTimeoutHeight() { + return instance.getTimeoutHeight(); + } + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + public Builder setTimeoutHeight(com.icon.proto.core.client.Height value) { + copyOnWrite(); + instance.setTimeoutHeight(value); + return this; + } + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + public Builder setTimeoutHeight( + com.icon.proto.core.client.Height.Builder builderForValue) { + copyOnWrite(); + instance.setTimeoutHeight(builderForValue.build()); + return this; + } + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + public Builder mergeTimeoutHeight(com.icon.proto.core.client.Height value) { + copyOnWrite(); + instance.mergeTimeoutHeight(value); + return this; + } + /** + *
+     * block height after which the packet times out
+     * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + */ + public Builder clearTimeoutHeight() { copyOnWrite(); + instance.clearTimeoutHeight(); + return this; + } + + /** + *
+     * block timestamp (in nanoseconds) after which the packet times out
+     * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @return The timeoutTimestamp. + */ + @java.lang.Override + public long getTimeoutTimestamp() { + return instance.getTimeoutTimestamp(); + } + /** + *
+     * block timestamp (in nanoseconds) after which the packet times out
+     * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @param value The timeoutTimestamp to set. + * @return This builder for chaining. + */ + public Builder setTimeoutTimestamp(long value) { + copyOnWrite(); + instance.setTimeoutTimestamp(value); + return this; + } + /** + *
+     * block timestamp (in nanoseconds) after which the packet times out
+     * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @return This builder for chaining. + */ + public Builder clearTimeoutTimestamp() { + copyOnWrite(); + instance.clearTimeoutTimestamp(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.channel.Packet) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.channel.Packet(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "sequence_", + "sourcePort_", + "sourceChannel_", + "destinationPort_", + "destinationChannel_", + "data_", + "timeoutHeight_", + "timeoutTimestamp_", + }; + java.lang.String info = + "\u0000\b\u0000\u0000\u0001\b\b\u0000\u0000\u0000\u0001\u0003\u0002\u0208\u0003\u0208" + + "\u0004\u0208\u0005\u0208\u0006\n\u0007\t\b\u0003"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.channel.Packet.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.channel.Packet) + private static final com.icon.proto.core.channel.Packet DEFAULT_INSTANCE; + static { + Packet defaultInstance = new Packet(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Packet.class, defaultInstance); + } + + public static com.icon.proto.core.channel.Packet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketOrBuilder.java new file mode 100644 index 000000000..cfbc8e13c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +public interface PacketOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.channel.Packet) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * number corresponds to the order of sends and receives, where a Packet
+   * with an earlier sequence number must be sent and received before a Packet
+   * with a later sequence number.
+   * 
+ * + * uint64 sequence = 1 [json_name = "sequence"]; + * @return The sequence. + */ + long getSequence(); + + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The sourcePort. + */ + java.lang.String getSourcePort(); + /** + *
+   * identifies the port on the sending chain.
+   * 
+ * + * string source_port = 2 [json_name = "sourcePort"]; + * @return The bytes for sourcePort. + */ + com.google.protobuf.ByteString + getSourcePortBytes(); + + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The sourceChannel. + */ + java.lang.String getSourceChannel(); + /** + *
+   * identifies the channel end on the sending chain.
+   * 
+ * + * string source_channel = 3 [json_name = "sourceChannel"]; + * @return The bytes for sourceChannel. + */ + com.google.protobuf.ByteString + getSourceChannelBytes(); + + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The destinationPort. + */ + java.lang.String getDestinationPort(); + /** + *
+   * identifies the port on the receiving chain.
+   * 
+ * + * string destination_port = 4 [json_name = "destinationPort"]; + * @return The bytes for destinationPort. + */ + com.google.protobuf.ByteString + getDestinationPortBytes(); + + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The destinationChannel. + */ + java.lang.String getDestinationChannel(); + /** + *
+   * identifies the channel end on the receiving chain.
+   * 
+ * + * string destination_channel = 5 [json_name = "destinationChannel"]; + * @return The bytes for destinationChannel. + */ + com.google.protobuf.ByteString + getDestinationChannelBytes(); + + /** + *
+   * actual opaque bytes transferred directly to the application module
+   * 
+ * + * bytes data = 6 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + * @return Whether the timeoutHeight field is set. + */ + boolean hasTimeoutHeight(); + /** + *
+   * block height after which the packet times out
+   * 
+ * + * .icon.proto.core.client.Height timeout_height = 7 [json_name = "timeoutHeight"]; + * @return The timeoutHeight. + */ + com.icon.proto.core.client.Height getTimeoutHeight(); + + /** + *
+   * block timestamp (in nanoseconds) after which the packet times out
+   * 
+ * + * uint64 timeout_timestamp = 8 [json_name = "timeoutTimestamp"]; + * @return The timeoutTimestamp. + */ + long getTimeoutTimestamp(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketState.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketState.java new file mode 100644 index 000000000..f66526a6b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketState.java @@ -0,0 +1,634 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +/** + *
+ * PacketState defines the generic type necessary to retrieve and store
+ * packet commitments, acknowledgements, and receipts.
+ * Caller is responsible for knowing the context necessary to interpret this
+ * state as a commitment, acknowledgement, or a receipt.
+ * 
+ * + * Protobuf type {@code icon.proto.core.channel.PacketState} + */ +public final class PacketState extends + com.google.protobuf.GeneratedMessageLite< + PacketState, PacketState.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.channel.PacketState) + PacketStateOrBuilder { + private PacketState() { + portId_ = ""; + channelId_ = ""; + data_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int PORT_ID_FIELD_NUMBER = 1; + private java.lang.String portId_; + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return portId_; + } + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(portId_); + } + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The portId to set. + */ + private void setPortId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + portId_ = value; + } + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + */ + private void clearPortId() { + + portId_ = getDefaultInstance().getPortId(); + } + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The bytes for portId to set. + */ + private void setPortIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + portId_ = value.toStringUtf8(); + + } + + public static final int CHANNEL_ID_FIELD_NUMBER = 2; + private java.lang.String channelId_; + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return channelId_; + } + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(channelId_); + } + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The channelId to set. + */ + private void setChannelId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + channelId_ = value; + } + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + */ + private void clearChannelId() { + + channelId_ = getDefaultInstance().getChannelId(); + } + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + */ + private void setChannelIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + channelId_ = value.toStringUtf8(); + + } + + public static final int SEQUENCE_FIELD_NUMBER = 3; + private long sequence_; + /** + *
+   * packet sequence.
+   * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return sequence_; + } + /** + *
+   * packet sequence.
+   * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @param value The sequence to set. + */ + private void setSequence(long value) { + + sequence_ = value; + } + /** + *
+   * packet sequence.
+   * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + */ + private void clearSequence() { + + sequence_ = 0L; + } + + public static final int DATA_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString data_; + /** + *
+   * embedded data that represents packet state.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + *
+   * embedded data that represents packet state.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @param value The data to set. + */ + private void setData(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + data_ = value; + } + /** + *
+   * embedded data that represents packet state.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + */ + private void clearData() { + + data_ = getDefaultInstance().getData(); + } + + public static com.icon.proto.core.channel.PacketState parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.PacketState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.channel.PacketState parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.PacketState parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.PacketState parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.channel.PacketState parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.channel.PacketState prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * PacketState defines the generic type necessary to retrieve and store
+   * packet commitments, acknowledgements, and receipts.
+   * Caller is responsible for knowing the context necessary to interpret this
+   * state as a commitment, acknowledgement, or a receipt.
+   * 
+ * + * Protobuf type {@code icon.proto.core.channel.PacketState} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.channel.PacketState, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.channel.PacketState) + com.icon.proto.core.channel.PacketStateOrBuilder { + // Construct using com.icon.proto.core.channel.PacketState.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * channel port identifier.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + @java.lang.Override + public java.lang.String getPortId() { + return instance.getPortId(); + } + /** + *
+     * channel port identifier.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getPortIdBytes() { + return instance.getPortIdBytes(); + } + /** + *
+     * channel port identifier.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The portId to set. + * @return This builder for chaining. + */ + public Builder setPortId( + java.lang.String value) { + copyOnWrite(); + instance.setPortId(value); + return this; + } + /** + *
+     * channel port identifier.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return This builder for chaining. + */ + public Builder clearPortId() { + copyOnWrite(); + instance.clearPortId(); + return this; + } + /** + *
+     * channel port identifier.
+     * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @param value The bytes for portId to set. + * @return This builder for chaining. + */ + public Builder setPortIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPortIdBytes(value); + return this; + } + + /** + *
+     * channel unique identifier.
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + @java.lang.Override + public java.lang.String getChannelId() { + return instance.getChannelId(); + } + /** + *
+     * channel unique identifier.
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChannelIdBytes() { + return instance.getChannelIdBytes(); + } + /** + *
+     * channel unique identifier.
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelId( + java.lang.String value) { + copyOnWrite(); + instance.setChannelId(value); + return this; + } + /** + *
+     * channel unique identifier.
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return This builder for chaining. + */ + public Builder clearChannelId() { + copyOnWrite(); + instance.clearChannelId(); + return this; + } + /** + *
+     * channel unique identifier.
+     * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @param value The bytes for channelId to set. + * @return This builder for chaining. + */ + public Builder setChannelIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setChannelIdBytes(value); + return this; + } + + /** + *
+     * packet sequence.
+     * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @return The sequence. + */ + @java.lang.Override + public long getSequence() { + return instance.getSequence(); + } + /** + *
+     * packet sequence.
+     * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @param value The sequence to set. + * @return This builder for chaining. + */ + public Builder setSequence(long value) { + copyOnWrite(); + instance.setSequence(value); + return this; + } + /** + *
+     * packet sequence.
+     * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @return This builder for chaining. + */ + public Builder clearSequence() { + copyOnWrite(); + instance.clearSequence(); + return this; + } + + /** + *
+     * embedded data that represents packet state.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return instance.getData(); + } + /** + *
+     * embedded data that represents packet state.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setData(value); + return this; + } + /** + *
+     * embedded data that represents packet state.
+     * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + copyOnWrite(); + instance.clearData(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.channel.PacketState) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.channel.PacketState(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "portId_", + "channelId_", + "sequence_", + "data_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\u0003\u0004\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.channel.PacketState.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.channel.PacketState) + private static final com.icon.proto.core.channel.PacketState DEFAULT_INSTANCE; + static { + PacketState defaultInstance = new PacketState(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + PacketState.class, defaultInstance); + } + + public static com.icon.proto.core.channel.PacketState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketStateOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketStateOrBuilder.java new file mode 100644 index 000000000..443d7068f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/channel/PacketStateOrBuilder.java @@ -0,0 +1,69 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/04-channel/Channel.proto + +package com.icon.proto.core.channel; + +public interface PacketStateOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.channel.PacketState) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The portId. + */ + java.lang.String getPortId(); + /** + *
+   * channel port identifier.
+   * 
+ * + * string port_id = 1 [json_name = "portId"]; + * @return The bytes for portId. + */ + com.google.protobuf.ByteString + getPortIdBytes(); + + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The channelId. + */ + java.lang.String getChannelId(); + /** + *
+   * channel unique identifier.
+   * 
+ * + * string channel_id = 2 [json_name = "channelId"]; + * @return The bytes for channelId. + */ + com.google.protobuf.ByteString + getChannelIdBytes(); + + /** + *
+   * packet sequence.
+   * 
+ * + * uint64 sequence = 3 [json_name = "sequence"]; + * @return The sequence. + */ + long getSequence(); + + /** + *
+   * embedded data that represents packet state.
+   * 
+ * + * bytes data = 4 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/ClientProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/ClientProto.java new file mode 100644 index 000000000..4cfa6b80f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/ClientProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/02-client/Client.proto + +package com.icon.proto.core.client; + +public final class ClientProto { + private ClientProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/Height.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/Height.java new file mode 100644 index 000000000..8b4c3e1a1 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/Height.java @@ -0,0 +1,364 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/02-client/Client.proto + +package com.icon.proto.core.client; + +/** + *
+ * Height is a monotonically increasing data type
+ * that can be compared against another Height for the purposes of updating and
+ * freezing clients
+ * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber
+ * the same. However some consensus algorithms may choose to reset the
+ * height in certain conditions e.g. hard forks, state-machine breaking changes
+ * In these cases, the RevisionNumber is incremented so that height continues to
+ * be monitonically increasing even as the RevisionHeight gets reset
+ * 
+ * + * Protobuf type {@code icon.proto.core.client.Height} + */ +public final class Height extends + com.google.protobuf.GeneratedMessageLite< + Height, Height.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.client.Height) + HeightOrBuilder { + private Height() { + } + public static final int REVISION_NUMBER_FIELD_NUMBER = 1; + private long revisionNumber_; + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + @java.lang.Override + public long getRevisionNumber() { + return revisionNumber_; + } + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @param value The revisionNumber to set. + */ + private void setRevisionNumber(long value) { + + revisionNumber_ = value; + } + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + */ + private void clearRevisionNumber() { + + revisionNumber_ = 0L; + } + + public static final int REVISION_HEIGHT_FIELD_NUMBER = 2; + private long revisionHeight_; + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + @java.lang.Override + public long getRevisionHeight() { + return revisionHeight_; + } + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @param value The revisionHeight to set. + */ + private void setRevisionHeight(long value) { + + revisionHeight_ = value; + } + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + */ + private void clearRevisionHeight() { + + revisionHeight_ = 0L; + } + + public static com.icon.proto.core.client.Height parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.client.Height parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.client.Height parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.client.Height parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.client.Height parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.client.Height parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.client.Height parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.client.Height parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.client.Height parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.client.Height parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.client.Height parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.client.Height parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.client.Height prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Height is a monotonically increasing data type
+   * that can be compared against another Height for the purposes of updating and
+   * freezing clients
+   * Normally the RevisionHeight is incremented at each height while keeping RevisionNumber
+   * the same. However some consensus algorithms may choose to reset the
+   * height in certain conditions e.g. hard forks, state-machine breaking changes
+   * In these cases, the RevisionNumber is incremented so that height continues to
+   * be monitonically increasing even as the RevisionHeight gets reset
+   * 
+ * + * Protobuf type {@code icon.proto.core.client.Height} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.client.Height, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.client.Height) + com.icon.proto.core.client.HeightOrBuilder { + // Construct using com.icon.proto.core.client.Height.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + @java.lang.Override + public long getRevisionNumber() { + return instance.getRevisionNumber(); + } + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @param value The revisionNumber to set. + * @return This builder for chaining. + */ + public Builder setRevisionNumber(long value) { + copyOnWrite(); + instance.setRevisionNumber(value); + return this; + } + /** + *
+     * the revision that the client is currently on
+     * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return This builder for chaining. + */ + public Builder clearRevisionNumber() { + copyOnWrite(); + instance.clearRevisionNumber(); + return this; + } + + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + @java.lang.Override + public long getRevisionHeight() { + return instance.getRevisionHeight(); + } + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @param value The revisionHeight to set. + * @return This builder for chaining. + */ + public Builder setRevisionHeight(long value) { + copyOnWrite(); + instance.setRevisionHeight(value); + return this; + } + /** + *
+     * the height within the given revision
+     * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return This builder for chaining. + */ + public Builder clearRevisionHeight() { + copyOnWrite(); + instance.clearRevisionHeight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.client.Height) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.client.Height(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "revisionNumber_", + "revisionHeight_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.client.Height.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.client.Height) + private static final com.icon.proto.core.client.Height DEFAULT_INSTANCE; + static { + Height defaultInstance = new Height(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Height.class, defaultInstance); + } + + public static com.icon.proto.core.client.Height getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/HeightOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/HeightOrBuilder.java new file mode 100644 index 000000000..5e1621801 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/client/HeightOrBuilder.java @@ -0,0 +1,29 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/02-client/Client.proto + +package com.icon.proto.core.client; + +public interface HeightOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.client.Height) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * the revision that the client is currently on
+   * 
+ * + * uint64 revision_number = 1 [json_name = "revisionNumber"]; + * @return The revisionNumber. + */ + long getRevisionNumber(); + + /** + *
+   * the height within the given revision
+   * 
+ * + * uint64 revision_height = 2 [json_name = "revisionHeight"]; + * @return The revisionHeight. + */ + long getRevisionHeight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntry.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntry.java new file mode 100644 index 000000000..4184bab4c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntry.java @@ -0,0 +1,447 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * Use BatchEntry not CommitmentProof, to avoid recursion
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.BatchEntry} + */ +public final class BatchEntry extends + com.google.protobuf.GeneratedMessageLite< + BatchEntry, BatchEntry.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.BatchEntry) + BatchEntryOrBuilder { + private BatchEntry() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.icon.proto.core.commitment.ExistenceProof) proof_; + } + return com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.ExistenceProof.newBuilder((com.icon.proto.core.commitment.ExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.NonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.icon.proto.core.commitment.NonExistenceProof) proof_; + } + return com.icon.proto.core.commitment.NonExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.icon.proto.core.commitment.NonExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.NonExistenceProof.newBuilder((com.icon.proto.core.commitment.NonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchEntry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.BatchEntry prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Use BatchEntry not CommitmentProof, to avoid recursion
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.BatchEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.BatchEntry, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.BatchEntry) + com.icon.proto.core.commitment.BatchEntryOrBuilder { + // Construct using com.icon.proto.core.commitment.BatchEntry.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getExist() { + return instance.getExist(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.icon.proto.core.commitment.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.NonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.icon.proto.core.commitment.NonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.BatchEntry) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.BatchEntry(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.icon.proto.core.commitment.ExistenceProof.class, + com.icon.proto.core.commitment.NonExistenceProof.class, + }; + java.lang.String info = + "\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.BatchEntry.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.BatchEntry) + private static final com.icon.proto.core.commitment.BatchEntry DEFAULT_INSTANCE; + static { + BatchEntry defaultInstance = new BatchEntry(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BatchEntry.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.BatchEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntryOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntryOrBuilder.java new file mode 100644 index 000000000..a6c1d81e7 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchEntryOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface BatchEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.BatchEntry) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.icon.proto.core.commitment.ExistenceProof getExist(); + + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.icon.proto.core.commitment.NonExistenceProof getNonexist(); + + public com.icon.proto.core.commitment.BatchEntry.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProof.java new file mode 100644 index 000000000..6f7f29c7e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProof.java @@ -0,0 +1,390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ *BatchProof is a group of multiple proof types than can be compressed
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.BatchProof} + */ +public final class BatchProof extends + com.google.protobuf.GeneratedMessageLite< + BatchProof, BatchProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.BatchProof) + BatchProofOrBuilder { + private BatchProof() { + entries_ = emptyProtobufList(); + } + public static final int ENTRIES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList entries_; + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.BatchEntry getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public com.icon.proto.core.commitment.BatchEntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + private void ensureEntriesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = entries_; + if (!tmp.isModifiable()) { + entries_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void setEntries( + int index, com.icon.proto.core.commitment.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.set(index, value); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries(com.icon.proto.core.commitment.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(value); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries( + int index, com.icon.proto.core.commitment.BatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(index, value); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void addAllEntries( + java.lang.Iterable values) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, entries_); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void clearEntries() { + entries_ = emptyProtobufList(); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + private void removeEntries(int index) { + ensureEntriesIsMutable(); + entries_.remove(index); + } + + public static com.icon.proto.core.commitment.BatchProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.BatchProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.BatchProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *BatchProof is a group of multiple proof types than can be compressed
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.BatchProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.BatchProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.BatchProof) + com.icon.proto.core.commitment.BatchProofOrBuilder { + // Construct using com.icon.proto.core.commitment.BatchProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return java.util.Collections.unmodifiableList( + instance.getEntriesList()); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return instance.getEntriesCount(); + }/** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.BatchEntry getEntries(int index) { + return instance.getEntries(index); + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.icon.proto.core.commitment.BatchEntry value) { + copyOnWrite(); + instance.setEntries(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.icon.proto.core.commitment.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.setEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries(com.icon.proto.core.commitment.BatchEntry value) { + copyOnWrite(); + instance.addEntries(value); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.icon.proto.core.commitment.BatchEntry value) { + copyOnWrite(); + instance.addEntries(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + com.icon.proto.core.commitment.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.icon.proto.core.commitment.BatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllEntries(values); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder clearEntries() { + copyOnWrite(); + instance.clearEntries(); + return this; + } + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder removeEntries(int index) { + copyOnWrite(); + instance.removeEntries(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.BatchProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.BatchProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "entries_", + com.icon.proto.core.commitment.BatchEntry.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.BatchProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.BatchProof) + private static final com.icon.proto.core.commitment.BatchProof DEFAULT_INSTANCE; + static { + BatchProof defaultInstance = new BatchProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BatchProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.BatchProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProofOrBuilder.java new file mode 100644 index 000000000..7a7f4eb96 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/BatchProofOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface BatchProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.BatchProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + java.util.List + getEntriesList(); + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + com.icon.proto.core.commitment.BatchEntry getEntries(int index); + /** + * repeated .icon.proto.core.commitment.BatchEntry entries = 1 [json_name = "entries"]; + */ + int getEntriesCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProof.java new file mode 100644 index 000000000..c16e16e37 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProof.java @@ -0,0 +1,649 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ *CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.CommitmentProof} + */ +public final class CommitmentProof extends + com.google.protobuf.GeneratedMessageLite< + CommitmentProof, CommitmentProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.CommitmentProof) + CommitmentProofOrBuilder { + private CommitmentProof() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + BATCH(3), + COMPRESSED(4), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 3: return BATCH; + case 4: return COMPRESSED; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.icon.proto.core.commitment.ExistenceProof) proof_; + } + return com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.ExistenceProof.newBuilder((com.icon.proto.core.commitment.ExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.NonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.icon.proto.core.commitment.NonExistenceProof) proof_; + } + return com.icon.proto.core.commitment.NonExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.icon.proto.core.commitment.NonExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.NonExistenceProof.newBuilder((com.icon.proto.core.commitment.NonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int BATCH_FIELD_NUMBER = 3; + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public boolean hasBatch() { + return proofCase_ == 3; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.BatchProof getBatch() { + if (proofCase_ == 3) { + return (com.icon.proto.core.commitment.BatchProof) proof_; + } + return com.icon.proto.core.commitment.BatchProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + private void setBatch(com.icon.proto.core.commitment.BatchProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 3; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + private void mergeBatch(com.icon.proto.core.commitment.BatchProof value) { + value.getClass(); + if (proofCase_ == 3 && + proof_ != com.icon.proto.core.commitment.BatchProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.BatchProof.newBuilder((com.icon.proto.core.commitment.BatchProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 3; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + private void clearBatch() { + if (proofCase_ == 3) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int COMPRESSED_FIELD_NUMBER = 4; + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public boolean hasCompressed() { + return proofCase_ == 4; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedBatchProof getCompressed() { + if (proofCase_ == 4) { + return (com.icon.proto.core.commitment.CompressedBatchProof) proof_; + } + return com.icon.proto.core.commitment.CompressedBatchProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void setCompressed(com.icon.proto.core.commitment.CompressedBatchProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 4; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void mergeCompressed(com.icon.proto.core.commitment.CompressedBatchProof value) { + value.getClass(); + if (proofCase_ == 4 && + proof_ != com.icon.proto.core.commitment.CompressedBatchProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.CompressedBatchProof.newBuilder((com.icon.proto.core.commitment.CompressedBatchProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 4; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + private void clearCompressed() { + if (proofCase_ == 4) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CommitmentProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CommitmentProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CommitmentProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.CommitmentProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.CommitmentProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.CommitmentProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.CommitmentProof) + com.icon.proto.core.commitment.CommitmentProofOrBuilder { + // Construct using com.icon.proto.core.commitment.CommitmentProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getExist() { + return instance.getExist(); + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.icon.proto.core.commitment.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.NonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.icon.proto.core.commitment.NonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.icon.proto.core.commitment.NonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public boolean hasBatch() { + return instance.hasBatch(); + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.BatchProof getBatch() { + return instance.getBatch(); + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder setBatch(com.icon.proto.core.commitment.BatchProof value) { + copyOnWrite(); + instance.setBatch(value); + return this; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder setBatch( + com.icon.proto.core.commitment.BatchProof.Builder builderForValue) { + copyOnWrite(); + instance.setBatch(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder mergeBatch(com.icon.proto.core.commitment.BatchProof value) { + copyOnWrite(); + instance.mergeBatch(value); + return this; + } + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + */ + public Builder clearBatch() { + copyOnWrite(); + instance.clearBatch(); + return this; + } + + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public boolean hasCompressed() { + return instance.hasCompressed(); + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedBatchProof getCompressed() { + return instance.getCompressed(); + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder setCompressed(com.icon.proto.core.commitment.CompressedBatchProof value) { + copyOnWrite(); + instance.setCompressed(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder setCompressed( + com.icon.proto.core.commitment.CompressedBatchProof.Builder builderForValue) { + copyOnWrite(); + instance.setCompressed(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder mergeCompressed(com.icon.proto.core.commitment.CompressedBatchProof value) { + copyOnWrite(); + instance.mergeCompressed(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + */ + public Builder clearCompressed() { + copyOnWrite(); + instance.clearCompressed(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.CommitmentProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.CommitmentProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.icon.proto.core.commitment.ExistenceProof.class, + com.icon.proto.core.commitment.NonExistenceProof.class, + com.icon.proto.core.commitment.BatchProof.class, + com.icon.proto.core.commitment.CompressedBatchProof.class, + }; + java.lang.String info = + "\u0000\u0004\u0001\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000\u0003<\u0000\u0004<\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.CommitmentProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.CommitmentProof) + private static final com.icon.proto.core.commitment.CommitmentProof DEFAULT_INSTANCE; + static { + CommitmentProof defaultInstance = new CommitmentProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CommitmentProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.CommitmentProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProofOrBuilder.java new file mode 100644 index 000000000..e992feafa --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProofOrBuilder.java @@ -0,0 +1,55 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface CommitmentProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.CommitmentProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .icon.proto.core.commitment.ExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.icon.proto.core.commitment.ExistenceProof getExist(); + + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .icon.proto.core.commitment.NonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.icon.proto.core.commitment.NonExistenceProof getNonexist(); + + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + * @return Whether the batch field is set. + */ + boolean hasBatch(); + /** + * .icon.proto.core.commitment.BatchProof batch = 3 [json_name = "batch"]; + * @return The batch. + */ + com.icon.proto.core.commitment.BatchProof getBatch(); + + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + * @return Whether the compressed field is set. + */ + boolean hasCompressed(); + /** + * .icon.proto.core.commitment.CompressedBatchProof compressed = 4 [json_name = "compressed"]; + * @return The compressed. + */ + com.icon.proto.core.commitment.CompressedBatchProof getCompressed(); + + public com.icon.proto.core.commitment.CommitmentProof.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProto.java new file mode 100644 index 000000000..927f424b3 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CommitmentProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +public final class CommitmentProto { + private CommitmentProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntry.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntry.java new file mode 100644 index 000000000..3d968f4bf --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntry.java @@ -0,0 +1,447 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * Use BatchEntry not CommitmentProof, to avoid recursion
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.CompressedBatchEntry} + */ +public final class CompressedBatchEntry extends + com.google.protobuf.GeneratedMessageLite< + CompressedBatchEntry, CompressedBatchEntry.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.CompressedBatchEntry) + CompressedBatchEntryOrBuilder { + private CompressedBatchEntry() { + } + private int proofCase_ = 0; + private java.lang.Object proof_; + public enum ProofCase { + EXIST(1), + NONEXIST(2), + PROOF_NOT_SET(0); + private final int value; + private ProofCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ProofCase valueOf(int value) { + return forNumber(value); + } + + public static ProofCase forNumber(int value) { + switch (value) { + case 1: return EXIST; + case 2: return NONEXIST; + case 0: return PROOF_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public ProofCase + getProofCase() { + return ProofCase.forNumber( + proofCase_); + } + + private void clearProof() { + proofCase_ = 0; + proof_ = null; + } + + public static final int EXIST_FIELD_NUMBER = 1; + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return proofCase_ == 1; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getExist() { + if (proofCase_ == 1) { + return (com.icon.proto.core.commitment.CompressedExistenceProof) proof_; + } + return com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void setExist(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void mergeExist(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + if (proofCase_ == 1 && + proof_ != com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.CompressedExistenceProof.newBuilder((com.icon.proto.core.commitment.CompressedExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 1; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + private void clearExist() { + if (proofCase_ == 1) { + proofCase_ = 0; + proof_ = null; + } + } + + public static final int NONEXIST_FIELD_NUMBER = 2; + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return proofCase_ == 2; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedNonExistenceProof getNonexist() { + if (proofCase_ == 2) { + return (com.icon.proto.core.commitment.CompressedNonExistenceProof) proof_; + } + return com.icon.proto.core.commitment.CompressedNonExistenceProof.getDefaultInstance(); + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void setNonexist(com.icon.proto.core.commitment.CompressedNonExistenceProof value) { + value.getClass(); + proof_ = value; + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void mergeNonexist(com.icon.proto.core.commitment.CompressedNonExistenceProof value) { + value.getClass(); + if (proofCase_ == 2 && + proof_ != com.icon.proto.core.commitment.CompressedNonExistenceProof.getDefaultInstance()) { + proof_ = com.icon.proto.core.commitment.CompressedNonExistenceProof.newBuilder((com.icon.proto.core.commitment.CompressedNonExistenceProof) proof_) + .mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + proofCase_ = 2; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + private void clearNonexist() { + if (proofCase_ == 2) { + proofCase_ = 0; + proof_ = null; + } + } + + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchEntry parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.CompressedBatchEntry prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Use BatchEntry not CommitmentProof, to avoid recursion
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.CompressedBatchEntry} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.CompressedBatchEntry, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.CompressedBatchEntry) + com.icon.proto.core.commitment.CompressedBatchEntryOrBuilder { + // Construct using com.icon.proto.core.commitment.CompressedBatchEntry.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public ProofCase + getProofCase() { + return instance.getProofCase(); + } + + public Builder clearProof() { + copyOnWrite(); + instance.clearProof(); + return this; + } + + + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public boolean hasExist() { + return instance.hasExist(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getExist() { + return instance.getExist(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.setExist(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder setExist( + com.icon.proto.core.commitment.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setExist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder mergeExist(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeExist(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + */ + public Builder clearExist() { + copyOnWrite(); + instance.clearExist(); + return this; + } + + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public boolean hasNonexist() { + return instance.hasNonexist(); + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedNonExistenceProof getNonexist() { + return instance.getNonexist(); + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist(com.icon.proto.core.commitment.CompressedNonExistenceProof value) { + copyOnWrite(); + instance.setNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder setNonexist( + com.icon.proto.core.commitment.CompressedNonExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setNonexist(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder mergeNonexist(com.icon.proto.core.commitment.CompressedNonExistenceProof value) { + copyOnWrite(); + instance.mergeNonexist(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + */ + public Builder clearNonexist() { + copyOnWrite(); + instance.clearNonexist(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.CompressedBatchEntry) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.CompressedBatchEntry(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proof_", + "proofCase_", + com.icon.proto.core.commitment.CompressedExistenceProof.class, + com.icon.proto.core.commitment.CompressedNonExistenceProof.class, + }; + java.lang.String info = + "\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001<\u0000\u0002<" + + "\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.CompressedBatchEntry.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.CompressedBatchEntry) + private static final com.icon.proto.core.commitment.CompressedBatchEntry DEFAULT_INSTANCE; + static { + CompressedBatchEntry defaultInstance = new CompressedBatchEntry(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedBatchEntry.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.CompressedBatchEntry getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntryOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntryOrBuilder.java new file mode 100644 index 000000000..46081a76d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchEntryOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface CompressedBatchEntryOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.CompressedBatchEntry) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + * @return Whether the exist field is set. + */ + boolean hasExist(); + /** + * .icon.proto.core.commitment.CompressedExistenceProof exist = 1 [json_name = "exist"]; + * @return The exist. + */ + com.icon.proto.core.commitment.CompressedExistenceProof getExist(); + + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return Whether the nonexist field is set. + */ + boolean hasNonexist(); + /** + * .icon.proto.core.commitment.CompressedNonExistenceProof nonexist = 2 [json_name = "nonexist"]; + * @return The nonexist. + */ + com.icon.proto.core.commitment.CompressedNonExistenceProof getNonexist(); + + public com.icon.proto.core.commitment.CompressedBatchEntry.ProofCase getProofCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProof.java new file mode 100644 index 000000000..905b94ed6 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProof.java @@ -0,0 +1,582 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + * Protobuf type {@code icon.proto.core.commitment.CompressedBatchProof} + */ +public final class CompressedBatchProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedBatchProof, CompressedBatchProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.CompressedBatchProof) + CompressedBatchProofOrBuilder { + private CompressedBatchProof() { + entries_ = emptyProtobufList(); + lookupInners_ = emptyProtobufList(); + } + public static final int ENTRIES_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList entries_; + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedBatchEntry getEntries(int index) { + return entries_.get(index); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public com.icon.proto.core.commitment.CompressedBatchEntryOrBuilder getEntriesOrBuilder( + int index) { + return entries_.get(index); + } + private void ensureEntriesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = entries_; + if (!tmp.isModifiable()) { + entries_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void setEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.set(index, value); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries(com.icon.proto.core.commitment.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(value); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry value) { + value.getClass(); + ensureEntriesIsMutable(); + entries_.add(index, value); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void addAllEntries( + java.lang.Iterable values) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, entries_); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void clearEntries() { + entries_ = emptyProtobufList(); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + private void removeEntries(int index) { + ensureEntriesIsMutable(); + entries_.remove(index); + } + + public static final int LOOKUP_INNERS_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList lookupInners_; + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public java.util.List getLookupInnersList() { + return lookupInners_; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public java.util.List + getLookupInnersOrBuilderList() { + return lookupInners_; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public int getLookupInnersCount() { + return lookupInners_.size(); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerOp getLookupInners(int index) { + return lookupInners_.get(index); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public com.icon.proto.core.commitment.InnerOpOrBuilder getLookupInnersOrBuilder( + int index) { + return lookupInners_.get(index); + } + private void ensureLookupInnersIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = lookupInners_; + if (!tmp.isModifiable()) { + lookupInners_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void setLookupInners( + int index, com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.set(index, value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addLookupInners(com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.add(value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addLookupInners( + int index, com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensureLookupInnersIsMutable(); + lookupInners_.add(index, value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void addAllLookupInners( + java.lang.Iterable values) { + ensureLookupInnersIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, lookupInners_); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void clearLookupInners() { + lookupInners_ = emptyProtobufList(); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + private void removeLookupInners(int index) { + ensureLookupInnersIsMutable(); + lookupInners_.remove(index); + } + + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedBatchProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.CompressedBatchProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.proto.core.commitment.CompressedBatchProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.CompressedBatchProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.CompressedBatchProof) + com.icon.proto.core.commitment.CompressedBatchProofOrBuilder { + // Construct using com.icon.proto.core.commitment.CompressedBatchProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public java.util.List getEntriesList() { + return java.util.Collections.unmodifiableList( + instance.getEntriesList()); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public int getEntriesCount() { + return instance.getEntriesCount(); + }/** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedBatchEntry getEntries(int index) { + return instance.getEntries(index); + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry value) { + copyOnWrite(); + instance.setEntries(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder setEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.setEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries(com.icon.proto.core.commitment.CompressedBatchEntry value) { + copyOnWrite(); + instance.addEntries(value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry value) { + copyOnWrite(); + instance.addEntries(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + com.icon.proto.core.commitment.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addEntries( + int index, com.icon.proto.core.commitment.CompressedBatchEntry.Builder builderForValue) { + copyOnWrite(); + instance.addEntries(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder addAllEntries( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllEntries(values); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder clearEntries() { + copyOnWrite(); + instance.clearEntries(); + return this; + } + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + public Builder removeEntries(int index) { + copyOnWrite(); + instance.removeEntries(index); + return this; + } + + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public java.util.List getLookupInnersList() { + return java.util.Collections.unmodifiableList( + instance.getLookupInnersList()); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public int getLookupInnersCount() { + return instance.getLookupInnersCount(); + }/** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerOp getLookupInners(int index) { + return instance.getLookupInners(index); + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder setLookupInners( + int index, com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.setLookupInners(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder setLookupInners( + int index, com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.setLookupInners(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners(com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.addLookupInners(value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + int index, com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.addLookupInners(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addLookupInners(builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addLookupInners( + int index, com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addLookupInners(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder addAllLookupInners( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllLookupInners(values); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder clearLookupInners() { + copyOnWrite(); + instance.clearLookupInners(); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + public Builder removeLookupInners(int index) { + copyOnWrite(); + instance.removeLookupInners(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.CompressedBatchProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.CompressedBatchProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "entries_", + com.icon.proto.core.commitment.CompressedBatchEntry.class, + "lookupInners_", + com.icon.proto.core.commitment.InnerOp.class, + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0002\u0000\u0001\u001b\u0002\u001b" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.CompressedBatchProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.CompressedBatchProof) + private static final com.icon.proto.core.commitment.CompressedBatchProof DEFAULT_INSTANCE; + static { + CompressedBatchProof defaultInstance = new CompressedBatchProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedBatchProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.CompressedBatchProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProofOrBuilder.java new file mode 100644 index 000000000..ff5f7274d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedBatchProofOrBuilder.java @@ -0,0 +1,37 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface CompressedBatchProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.CompressedBatchProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + java.util.List + getEntriesList(); + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + com.icon.proto.core.commitment.CompressedBatchEntry getEntries(int index); + /** + * repeated .icon.proto.core.commitment.CompressedBatchEntry entries = 1 [json_name = "entries"]; + */ + int getEntriesCount(); + + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + java.util.List + getLookupInnersList(); + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + com.icon.proto.core.commitment.InnerOp getLookupInners(int index); + /** + * repeated .icon.proto.core.commitment.InnerOp lookup_inners = 2 [json_name = "lookupInners"]; + */ + int getLookupInnersCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProof.java new file mode 100644 index 000000000..012401abf --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProof.java @@ -0,0 +1,590 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + * Protobuf type {@code icon.proto.core.commitment.CompressedExistenceProof} + */ +public final class CompressedExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedExistenceProof, CompressedExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.CompressedExistenceProof) + CompressedExistenceProofOrBuilder { + private CompressedExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + value_ = com.google.protobuf.ByteString.EMPTY; + path_ = emptyIntList(); + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + */ + private void setValue(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + value_ = value; + } + /** + * bytes value = 2 [json_name = "value"]; + */ + private void clearValue() { + + value_ = getDefaultInstance().getValue(); + } + + public static final int LEAF_FIELD_NUMBER = 3; + private com.icon.proto.core.commitment.LeafOp leaf_; + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return leaf_ != null; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeaf() { + return leaf_ == null ? com.icon.proto.core.commitment.LeafOp.getDefaultInstance() : leaf_; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void setLeaf(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + leaf_ = value; + + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeaf(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + if (leaf_ != null && + leaf_ != com.icon.proto.core.commitment.LeafOp.getDefaultInstance()) { + leaf_ = + com.icon.proto.core.commitment.LeafOp.newBuilder(leaf_).mergeFrom(value).buildPartial(); + } else { + leaf_ = value; + } + + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void clearLeaf() { leaf_ = null; + + } + + public static final int PATH_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.IntList path_; + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + @java.lang.Override + public java.util.List + getPathList() { + return path_; + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + @java.lang.Override + public int getPath(int index) { + return path_.getInt(index); + } + private int pathMemoizedSerializedSize = -1; + private void ensurePathIsMutable() { + com.google.protobuf.Internal.IntList tmp = path_; + if (!tmp.isModifiable()) { + path_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index to set the value at. + * @param value The path to set. + */ + private void setPath( + int index, int value) { + ensurePathIsMutable(); + path_.setInt(index, value); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to add. + */ + private void addPath(int value) { + ensurePathIsMutable(); + path_.addInt(value); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param values The path to add. + */ + private void addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, path_); + } + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + */ + private void clearPath() { + path_ = emptyIntList(); + } + + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.CompressedExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.proto.core.commitment.CompressedExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.CompressedExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.CompressedExistenceProof) + com.icon.proto.core.commitment.CompressedExistenceProofOrBuilder { + // Construct using com.icon.proto.core.commitment.CompressedExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return instance.getValue(); + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValue(value); + return this; + } + /** + * bytes value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + copyOnWrite(); + instance.clearValue(); + return this; + } + + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return instance.hasLeaf(); + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeaf() { + return instance.getLeaf(); + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.setLeaf(value); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf( + com.icon.proto.core.commitment.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeaf(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder mergeLeaf(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.mergeLeaf(value); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder clearLeaf() { copyOnWrite(); + instance.clearLeaf(); + return this; + } + + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + @java.lang.Override + public java.util.List + getPathList() { + return java.util.Collections.unmodifiableList( + instance.getPathList()); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + @java.lang.Override + public int getPathCount() { + return instance.getPathCount(); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + @java.lang.Override + public int getPath(int index) { + return instance.getPath(index); + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to set. + * @return This builder for chaining. + */ + public Builder setPath( + int index, int value) { + copyOnWrite(); + instance.setPath(index, value); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param value The path to add. + * @return This builder for chaining. + */ + public Builder addPath(int value) { + copyOnWrite(); + instance.addPath(value); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param values The path to add. + * @return This builder for chaining. + */ + public Builder addAllPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllPath(values); + return this; + } + /** + *
+     * these are indexes into the lookup_inners table in CompressedBatchProof
+     * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return This builder for chaining. + */ + public Builder clearPath() { + copyOnWrite(); + instance.clearPath(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.CompressedExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.CompressedExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "value_", + "leaf_", + "path_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\n\u0002\n\u0003" + + "\t\u0004\'"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.CompressedExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.CompressedExistenceProof) + private static final com.icon.proto.core.commitment.CompressedExistenceProof DEFAULT_INSTANCE; + static { + CompressedExistenceProof defaultInstance = new CompressedExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedExistenceProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.CompressedExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProofOrBuilder.java new file mode 100644 index 000000000..f248a7098 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedExistenceProofOrBuilder.java @@ -0,0 +1,61 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface CompressedExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.CompressedExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + boolean hasLeaf(); + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + * @return The leaf. + */ + com.icon.proto.core.commitment.LeafOp getLeaf(); + + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return A list containing the path. + */ + java.util.List getPathList(); + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @return The count of path. + */ + int getPathCount(); + /** + *
+   * these are indexes into the lookup_inners table in CompressedBatchProof
+   * 
+ * + * repeated int32 path = 4 [json_name = "path"]; + * @param index The index of the element to return. + * @return The path at the given index. + */ + int getPath(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProof.java new file mode 100644 index 000000000..e0859a384 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProof.java @@ -0,0 +1,453 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + * Protobuf type {@code icon.proto.core.commitment.CompressedNonExistenceProof} + */ +public final class CompressedNonExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + CompressedNonExistenceProof, CompressedNonExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.CompressedNonExistenceProof) + CompressedNonExistenceProofOrBuilder { + private CompressedNonExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int LEFT_FIELD_NUMBER = 2; + private com.icon.proto.core.commitment.CompressedExistenceProof left_; + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return left_ != null; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getLeft() { + return left_ == null ? com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance() : left_; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + private void setLeft(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + left_ = value; + + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeft(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + if (left_ != null && + left_ != com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance()) { + left_ = + com.icon.proto.core.commitment.CompressedExistenceProof.newBuilder(left_).mergeFrom(value).buildPartial(); + } else { + left_ = value; + } + + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + private void clearLeft() { left_ = null; + + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private com.icon.proto.core.commitment.CompressedExistenceProof right_; + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return right_ != null; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getRight() { + return right_ == null ? com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance() : right_; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + private void setRight(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + right_ = value; + + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeRight(com.icon.proto.core.commitment.CompressedExistenceProof value) { + value.getClass(); + if (right_ != null && + right_ != com.icon.proto.core.commitment.CompressedExistenceProof.getDefaultInstance()) { + right_ = + com.icon.proto.core.commitment.CompressedExistenceProof.newBuilder(right_).mergeFrom(value).buildPartial(); + } else { + right_ = value; + } + + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + private void clearRight() { right_ = null; + + } + + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.CompressedNonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.CompressedNonExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.proto.core.commitment.CompressedNonExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.CompressedNonExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.CompressedNonExistenceProof) + com.icon.proto.core.commitment.CompressedNonExistenceProofOrBuilder { + // Construct using com.icon.proto.core.commitment.CompressedNonExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return instance.hasLeft(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getLeft() { + return instance.getLeft(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.setLeft(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft( + com.icon.proto.core.commitment.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setLeft(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder mergeLeft(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeLeft(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + */ + public Builder clearLeft() { copyOnWrite(); + instance.clearLeft(); + return this; + } + + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return instance.hasRight(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CompressedExistenceProof getRight() { + return instance.getRight(); + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.setRight(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight( + com.icon.proto.core.commitment.CompressedExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setRight(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder mergeRight(com.icon.proto.core.commitment.CompressedExistenceProof value) { + copyOnWrite(); + instance.mergeRight(value); + return this; + } + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + */ + public Builder clearRight() { copyOnWrite(); + instance.clearRight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.CompressedNonExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.CompressedNonExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "left_", + "right_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + + "\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.CompressedNonExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.CompressedNonExistenceProof) + private static final com.icon.proto.core.commitment.CompressedNonExistenceProof DEFAULT_INSTANCE; + static { + CompressedNonExistenceProof defaultInstance = new CompressedNonExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CompressedNonExistenceProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.CompressedNonExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProofOrBuilder.java new file mode 100644 index 000000000..2fd2e2ec7 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/CompressedNonExistenceProofOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface CompressedNonExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.CompressedNonExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + * @return Whether the left field is set. + */ + boolean hasLeft(); + /** + * .icon.proto.core.commitment.CompressedExistenceProof left = 2 [json_name = "left"]; + * @return The left. + */ + com.icon.proto.core.commitment.CompressedExistenceProof getLeft(); + + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + * @return Whether the right field is set. + */ + boolean hasRight(); + /** + * .icon.proto.core.commitment.CompressedExistenceProof right = 3 [json_name = "right"]; + * @return The right. + */ + com.icon.proto.core.commitment.CompressedExistenceProof getRight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProof.java new file mode 100644 index 000000000..17a064955 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProof.java @@ -0,0 +1,631 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ **
+ *ExistenceProof takes a key and a value and a set of steps to perform on it.
+ *The result of peforming all these steps will provide a "root hash", which can
+ *be compared to the value in a header.
+ *Since it is computationally infeasible to produce a hash collission for any of the used
+ *cryptographic hash functions, if someone can provide a series of operations to transform
+ *a given key and value into a root hash that matches some trusted root, these key and values
+ *must be in the referenced merkle tree.
+ *The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
+ *which should be controlled by a spec. Eg. with lengthOp as NONE,
+ *prefix = FOO, key = BAR, value = CHOICE
+ *and
+ *prefix = F, key = OOBAR, value = CHOICE
+ *would produce the same value.
+ *With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
+ *in the ProofSpec is valuable to prevent this mutability. And why all trees should
+ *length-prefix the data before hashing it.
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.ExistenceProof} + */ +public final class ExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + ExistenceProof, ExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.ExistenceProof) + ExistenceProofOrBuilder { + private ExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + value_ = com.google.protobuf.ByteString.EMPTY; + path_ = emptyProtobufList(); + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + */ + private void setValue(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + value_ = value; + } + /** + * bytes value = 2 [json_name = "value"]; + */ + private void clearValue() { + + value_ = getDefaultInstance().getValue(); + } + + public static final int LEAF_FIELD_NUMBER = 3; + private com.icon.proto.core.commitment.LeafOp leaf_; + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return leaf_ != null; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeaf() { + return leaf_ == null ? com.icon.proto.core.commitment.LeafOp.getDefaultInstance() : leaf_; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void setLeaf(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + leaf_ = value; + + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeaf(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + if (leaf_ != null && + leaf_ != com.icon.proto.core.commitment.LeafOp.getDefaultInstance()) { + leaf_ = + com.icon.proto.core.commitment.LeafOp.newBuilder(leaf_).mergeFrom(value).buildPartial(); + } else { + leaf_ = value; + } + + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + private void clearLeaf() { leaf_ = null; + + } + + public static final int PATH_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList path_; + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public java.util.List getPathList() { + return path_; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public java.util.List + getPathOrBuilderList() { + return path_; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public int getPathCount() { + return path_.size(); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerOp getPath(int index) { + return path_.get(index); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public com.icon.proto.core.commitment.InnerOpOrBuilder getPathOrBuilder( + int index) { + return path_.get(index); + } + private void ensurePathIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = path_; + if (!tmp.isModifiable()) { + path_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void setPath( + int index, com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.set(index, value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void addPath(com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.add(value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void addPath( + int index, com.icon.proto.core.commitment.InnerOp value) { + value.getClass(); + ensurePathIsMutable(); + path_.add(index, value); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void addAllPath( + java.lang.Iterable values) { + ensurePathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, path_); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void clearPath() { + path_ = emptyProtobufList(); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + private void removePath(int index) { + ensurePathIsMutable(); + path_.remove(index); + } + + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.ExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.ExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *ExistenceProof takes a key and a value and a set of steps to perform on it.
+   *The result of peforming all these steps will provide a "root hash", which can
+   *be compared to the value in a header.
+   *Since it is computationally infeasible to produce a hash collission for any of the used
+   *cryptographic hash functions, if someone can provide a series of operations to transform
+   *a given key and value into a root hash that matches some trusted root, these key and values
+   *must be in the referenced merkle tree.
+   *The only possible issue is maliablity in LeafOp, such as providing extra prefix data,
+   *which should be controlled by a spec. Eg. with lengthOp as NONE,
+   *prefix = FOO, key = BAR, value = CHOICE
+   *and
+   *prefix = F, key = OOBAR, value = CHOICE
+   *would produce the same value.
+   *With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field
+   *in the ProofSpec is valuable to prevent this mutability. And why all trees should
+   *length-prefix the data before hashing it.
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.ExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.ExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.ExistenceProof) + com.icon.proto.core.commitment.ExistenceProofOrBuilder { + // Construct using com.icon.proto.core.commitment.ExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return instance.getValue(); + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValue(value); + return this; + } + /** + * bytes value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + copyOnWrite(); + instance.clearValue(); + return this; + } + + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public boolean hasLeaf() { + return instance.hasLeaf(); + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeaf() { + return instance.getLeaf(); + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.setLeaf(value); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder setLeaf( + com.icon.proto.core.commitment.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeaf(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder mergeLeaf(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.mergeLeaf(value); + return this; + } + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + */ + public Builder clearLeaf() { copyOnWrite(); + instance.clearLeaf(); + return this; + } + + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public java.util.List getPathList() { + return java.util.Collections.unmodifiableList( + instance.getPathList()); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public int getPathCount() { + return instance.getPathCount(); + }/** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerOp getPath(int index) { + return instance.getPath(index); + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder setPath( + int index, com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.setPath(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder setPath( + int index, com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.setPath(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath(com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.addPath(value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + int index, com.icon.proto.core.commitment.InnerOp value) { + copyOnWrite(); + instance.addPath(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addPath(builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addPath( + int index, com.icon.proto.core.commitment.InnerOp.Builder builderForValue) { + copyOnWrite(); + instance.addPath(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder addAllPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllPath(values); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder clearPath() { + copyOnWrite(); + instance.clearPath(); + return this; + } + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + public Builder removePath(int index) { + copyOnWrite(); + instance.removePath(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.ExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.ExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "value_", + "leaf_", + "path_", + com.icon.proto.core.commitment.InnerOp.class, + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\n\u0002\n\u0003" + + "\t\u0004\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.ExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.ExistenceProof) + private static final com.icon.proto.core.commitment.ExistenceProof DEFAULT_INSTANCE; + static { + ExistenceProof defaultInstance = new ExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ExistenceProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.ExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProofOrBuilder.java new file mode 100644 index 000000000..c77df0301 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ExistenceProofOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface ExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.ExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); + + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + * @return Whether the leaf field is set. + */ + boolean hasLeaf(); + /** + * .icon.proto.core.commitment.LeafOp leaf = 3 [json_name = "leaf"]; + * @return The leaf. + */ + com.icon.proto.core.commitment.LeafOp getLeaf(); + + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + java.util.List + getPathList(); + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + com.icon.proto.core.commitment.InnerOp getPath(int index); + /** + * repeated .icon.proto.core.commitment.InnerOp path = 4 [json_name = "path"]; + */ + int getPathCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/HashOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/HashOp.java new file mode 100644 index 000000000..1f1d4f7a5 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/HashOp.java @@ -0,0 +1,155 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + * Protobuf enum {@code icon.proto.core.commitment.HashOp} + */ +public enum HashOp + implements com.google.protobuf.Internal.EnumLite { + /** + *
+   * NO_HASH is the default if no data passed. Note this is an illegal argument some places.
+   * 
+ * + * NO_HASH = 0; + */ + NO_HASH(0), + /** + * SHA256 = 1; + */ + SHA256(1), + /** + * SHA512 = 2; + */ + SHA512(2), + /** + * KECCAK = 3; + */ + KECCAK(3), + /** + * RIPEMD160 = 4; + */ + RIPEMD160(4), + /** + *
+   * ripemd160(sha256(x))
+   * 
+ * + * BITCOIN = 5; + */ + BITCOIN(5), + /** + * SHA512_256 = 6; + */ + SHA512_256(6), + UNRECOGNIZED(-1), + ; + + /** + *
+   * NO_HASH is the default if no data passed. Note this is an illegal argument some places.
+   * 
+ * + * NO_HASH = 0; + */ + public static final int NO_HASH_VALUE = 0; + /** + * SHA256 = 1; + */ + public static final int SHA256_VALUE = 1; + /** + * SHA512 = 2; + */ + public static final int SHA512_VALUE = 2; + /** + * KECCAK = 3; + */ + public static final int KECCAK_VALUE = 3; + /** + * RIPEMD160 = 4; + */ + public static final int RIPEMD160_VALUE = 4; + /** + *
+   * ripemd160(sha256(x))
+   * 
+ * + * BITCOIN = 5; + */ + public static final int BITCOIN_VALUE = 5; + /** + * SHA512_256 = 6; + */ + public static final int SHA512_256_VALUE = 6; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HashOp valueOf(int value) { + return forNumber(value); + } + + public static HashOp forNumber(int value) { + switch (value) { + case 0: return NO_HASH; + case 1: return SHA256; + case 2: return SHA512; + case 3: return KECCAK; + case 4: return RIPEMD160; + case 5: return BITCOIN; + case 6: return SHA512_256; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HashOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public HashOp findValueByNumber(int number) { + return HashOp.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return HashOpVerifier.INSTANCE; + } + + private static final class HashOpVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new HashOpVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return HashOp.forNumber(number) != null; + } + }; + + private final int value; + + private HashOp(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.proto.core.commitment.HashOp) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOp.java new file mode 100644 index 000000000..7ff519335 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOp.java @@ -0,0 +1,417 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ **
+ *InnerOp represents a merkle-proof step that is not a leaf.
+ *It represents concatenating two children and hashing them to provide the next result.
+ *The result of the previous step is passed in, so the signature of this op is:
+ *innerOp(child) -> output
+ *The result of applying InnerOp should be:
+ *output = op.hash(op.prefix || child || op.suffix)
+ *where the || operator is concatenation of binary data,
+ *and child is the result of hashing all the tree below this step.
+ *Any special data, like prepending child with the length, or prepending the entire operation with
+ *some value to differentiate from leaf nodes, should be included in prefix and suffix.
+ *If either of prefix or suffix is empty, we just treat it as an empty string
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.InnerOp} + */ +public final class InnerOp extends + com.google.protobuf.GeneratedMessageLite< + InnerOp, InnerOp.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.InnerOp) + InnerOpOrBuilder { + private InnerOp() { + prefix_ = com.google.protobuf.ByteString.EMPTY; + suffix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private int hash_; + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + com.icon.proto.core.commitment.HashOp result = com.icon.proto.core.commitment.HashOp.forNumber(hash_); + return result == null ? com.icon.proto.core.commitment.HashOp.UNRECOGNIZED : result; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.icon.proto.core.commitment.HashOp value) { + hash_ = value.getNumber(); + + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static final int PREFIX_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString prefix_; + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return prefix_; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @param value The prefix to set. + */ + private void setPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + prefix_ = value; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + */ + private void clearPrefix() { + + prefix_ = getDefaultInstance().getPrefix(); + } + + public static final int SUFFIX_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString suffix_; + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuffix() { + return suffix_; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @param value The suffix to set. + */ + private void setSuffix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + suffix_ = value; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + */ + private void clearSuffix() { + + suffix_ = getDefaultInstance().getSuffix(); + } + + public static com.icon.proto.core.commitment.InnerOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.InnerOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *InnerOp represents a merkle-proof step that is not a leaf.
+   *It represents concatenating two children and hashing them to provide the next result.
+   *The result of the previous step is passed in, so the signature of this op is:
+   *innerOp(child) -> output
+   *The result of applying InnerOp should be:
+   *output = op.hash(op.prefix || child || op.suffix)
+   *where the || operator is concatenation of binary data,
+   *and child is the result of hashing all the tree below this step.
+   *Any special data, like prepending child with the length, or prepending the entire operation with
+   *some value to differentiate from leaf nodes, should be included in prefix and suffix.
+   *If either of prefix or suffix is empty, we just treat it as an empty string
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.InnerOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.InnerOp, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.InnerOp) + com.icon.proto.core.commitment.InnerOpOrBuilder { + // Construct using com.icon.proto.core.commitment.InnerOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + return instance.getHash(); + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.icon.proto.core.commitment.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return instance.getPrefix(); + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @param value The prefix to set. + * @return This builder for chaining. + */ + public Builder setPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPrefix(value); + return this; + } + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return This builder for chaining. + */ + public Builder clearPrefix() { + copyOnWrite(); + instance.clearPrefix(); + return this; + } + + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSuffix() { + return instance.getSuffix(); + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @param value The suffix to set. + * @return This builder for chaining. + */ + public Builder setSuffix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSuffix(value); + return this; + } + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return This builder for chaining. + */ + public Builder clearSuffix() { + copyOnWrite(); + instance.clearSuffix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.InnerOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.InnerOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + "prefix_", + "suffix_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\f\u0002\n\u0003" + + "\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.InnerOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.InnerOp) + private static final com.icon.proto.core.commitment.InnerOp DEFAULT_INSTANCE; + static { + InnerOp defaultInstance = new InnerOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + InnerOp.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.InnerOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOpOrBuilder.java new file mode 100644 index 000000000..d0c2c558e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerOpOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface InnerOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.InnerOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.icon.proto.core.commitment.HashOp getHash(); + + /** + * bytes prefix = 2 [json_name = "prefix"]; + * @return The prefix. + */ + com.google.protobuf.ByteString getPrefix(); + + /** + * bytes suffix = 3 [json_name = "suffix"]; + * @return The suffix. + */ + com.google.protobuf.ByteString getSuffix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpec.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpec.java new file mode 100644 index 000000000..7af62b5f0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpec.java @@ -0,0 +1,803 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ *InnerSpec contains all store-specific structure info to determine if two proofs from a
+ *given store are neighbors.
+ *This enables:
+ *isLeftMost(spec: InnerSpec, op: InnerOp)
+ *isRightMost(spec: InnerSpec, op: InnerOp)
+ *isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.InnerSpec} + */ +public final class InnerSpec extends + com.google.protobuf.GeneratedMessageLite< + InnerSpec, InnerSpec.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.InnerSpec) + InnerSpecOrBuilder { + private InnerSpec() { + childOrder_ = emptyIntList(); + emptyChild_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int CHILD_ORDER_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList childOrder_; + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + @java.lang.Override + public java.util.List + getChildOrderList() { + return childOrder_; + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + @java.lang.Override + public int getChildOrderCount() { + return childOrder_.size(); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + @java.lang.Override + public int getChildOrder(int index) { + return childOrder_.getInt(index); + } + private int childOrderMemoizedSerializedSize = -1; + private void ensureChildOrderIsMutable() { + com.google.protobuf.Internal.IntList tmp = childOrder_; + if (!tmp.isModifiable()) { + childOrder_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index to set the value at. + * @param value The childOrder to set. + */ + private void setChildOrder( + int index, int value) { + ensureChildOrderIsMutable(); + childOrder_.setInt(index, value); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to add. + */ + private void addChildOrder(int value) { + ensureChildOrderIsMutable(); + childOrder_.addInt(value); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param values The childOrder to add. + */ + private void addAllChildOrder( + java.lang.Iterable values) { + ensureChildOrderIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, childOrder_); + } + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + */ + private void clearChildOrder() { + childOrder_ = emptyIntList(); + } + + public static final int CHILD_SIZE_FIELD_NUMBER = 2; + private int childSize_; + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + @java.lang.Override + public int getChildSize() { + return childSize_; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @param value The childSize to set. + */ + private void setChildSize(int value) { + + childSize_ = value; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + */ + private void clearChildSize() { + + childSize_ = 0; + } + + public static final int MIN_PREFIX_LENGTH_FIELD_NUMBER = 3; + private int minPrefixLength_; + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + @java.lang.Override + public int getMinPrefixLength() { + return minPrefixLength_; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @param value The minPrefixLength to set. + */ + private void setMinPrefixLength(int value) { + + minPrefixLength_ = value; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + */ + private void clearMinPrefixLength() { + + minPrefixLength_ = 0; + } + + public static final int MAX_PREFIX_LENGTH_FIELD_NUMBER = 4; + private int maxPrefixLength_; + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + @java.lang.Override + public int getMaxPrefixLength() { + return maxPrefixLength_; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @param value The maxPrefixLength to set. + */ + private void setMaxPrefixLength(int value) { + + maxPrefixLength_ = value; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + */ + private void clearMaxPrefixLength() { + + maxPrefixLength_ = 0; + } + + public static final int EMPTY_CHILD_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString emptyChild_; + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmptyChild() { + return emptyChild_; + } + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @param value The emptyChild to set. + */ + private void setEmptyChild(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + emptyChild_ = value; + } + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + */ + private void clearEmptyChild() { + + emptyChild_ = getDefaultInstance().getEmptyChild(); + } + + public static final int HASH_FIELD_NUMBER = 6; + private int hash_; + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + com.icon.proto.core.commitment.HashOp result = com.icon.proto.core.commitment.HashOp.forNumber(hash_); + return result == null ? com.icon.proto.core.commitment.HashOp.UNRECOGNIZED : result; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.icon.proto.core.commitment.HashOp value) { + hash_ = value.getNumber(); + + } + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.InnerSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.InnerSpec prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *InnerSpec contains all store-specific structure info to determine if two proofs from a
+   *given store are neighbors.
+   *This enables:
+   *isLeftMost(spec: InnerSpec, op: InnerOp)
+   *isRightMost(spec: InnerSpec, op: InnerOp)
+   *isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp)
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.InnerSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.InnerSpec, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.InnerSpec) + com.icon.proto.core.commitment.InnerSpecOrBuilder { + // Construct using com.icon.proto.core.commitment.InnerSpec.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + @java.lang.Override + public java.util.List + getChildOrderList() { + return java.util.Collections.unmodifiableList( + instance.getChildOrderList()); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + @java.lang.Override + public int getChildOrderCount() { + return instance.getChildOrderCount(); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + @java.lang.Override + public int getChildOrder(int index) { + return instance.getChildOrder(index); + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to set. + * @return This builder for chaining. + */ + public Builder setChildOrder( + int index, int value) { + copyOnWrite(); + instance.setChildOrder(index, value); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param value The childOrder to add. + * @return This builder for chaining. + */ + public Builder addChildOrder(int value) { + copyOnWrite(); + instance.addChildOrder(value); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param values The childOrder to add. + * @return This builder for chaining. + */ + public Builder addAllChildOrder( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllChildOrder(values); + return this; + } + /** + *
+     * Child order is the ordering of the children node, must count from 0
+     * iavl tree is [0, 1] (left then right)
+     * merk is [0, 2, 1] (left, right, here)
+     * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return This builder for chaining. + */ + public Builder clearChildOrder() { + copyOnWrite(); + instance.clearChildOrder(); + return this; + } + + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + @java.lang.Override + public int getChildSize() { + return instance.getChildSize(); + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @param value The childSize to set. + * @return This builder for chaining. + */ + public Builder setChildSize(int value) { + copyOnWrite(); + instance.setChildSize(value); + return this; + } + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return This builder for chaining. + */ + public Builder clearChildSize() { + copyOnWrite(); + instance.clearChildSize(); + return this; + } + + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + @java.lang.Override + public int getMinPrefixLength() { + return instance.getMinPrefixLength(); + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @param value The minPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setMinPrefixLength(int value) { + copyOnWrite(); + instance.setMinPrefixLength(value); + return this; + } + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return This builder for chaining. + */ + public Builder clearMinPrefixLength() { + copyOnWrite(); + instance.clearMinPrefixLength(); + return this; + } + + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + @java.lang.Override + public int getMaxPrefixLength() { + return instance.getMaxPrefixLength(); + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @param value The maxPrefixLength to set. + * @return This builder for chaining. + */ + public Builder setMaxPrefixLength(int value) { + copyOnWrite(); + instance.setMaxPrefixLength(value); + return this; + } + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return This builder for chaining. + */ + public Builder clearMaxPrefixLength() { + copyOnWrite(); + instance.clearMaxPrefixLength(); + return this; + } + + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmptyChild() { + return instance.getEmptyChild(); + } + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @param value The emptyChild to set. + * @return This builder for chaining. + */ + public Builder setEmptyChild(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setEmptyChild(value); + return this; + } + /** + *
+     * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+     * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return This builder for chaining. + */ + public Builder clearEmptyChild() { + copyOnWrite(); + instance.clearEmptyChild(); + return this; + } + + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + return instance.getHash(); + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.icon.proto.core.commitment.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + *
+     * hash is the algorithm that must be used for each InnerOp
+     * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.InnerSpec) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.InnerSpec(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "childOrder_", + "childSize_", + "minPrefixLength_", + "maxPrefixLength_", + "emptyChild_", + "hash_", + }; + java.lang.String info = + "\u0000\u0006\u0000\u0000\u0001\u0006\u0006\u0000\u0001\u0000\u0001\'\u0002\u0004" + + "\u0003\u0004\u0004\u0004\u0005\n\u0006\f"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.InnerSpec.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.InnerSpec) + private static final com.icon.proto.core.commitment.InnerSpec DEFAULT_INSTANCE; + static { + InnerSpec defaultInstance = new InnerSpec(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + InnerSpec.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.InnerSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpecOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpecOrBuilder.java new file mode 100644 index 000000000..87f71285c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/InnerSpecOrBuilder.java @@ -0,0 +1,91 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface InnerSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.InnerSpec) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return A list containing the childOrder. + */ + java.util.List getChildOrderList(); + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @return The count of childOrder. + */ + int getChildOrderCount(); + /** + *
+   * Child order is the ordering of the children node, must count from 0
+   * iavl tree is [0, 1] (left then right)
+   * merk is [0, 2, 1] (left, right, here)
+   * 
+ * + * repeated int32 child_order = 1 [json_name = "childOrder"]; + * @param index The index of the element to return. + * @return The childOrder at the given index. + */ + int getChildOrder(int index); + + /** + * int32 child_size = 2 [json_name = "childSize"]; + * @return The childSize. + */ + int getChildSize(); + + /** + * int32 min_prefix_length = 3 [json_name = "minPrefixLength"]; + * @return The minPrefixLength. + */ + int getMinPrefixLength(); + + /** + * int32 max_prefix_length = 4 [json_name = "maxPrefixLength"]; + * @return The maxPrefixLength. + */ + int getMaxPrefixLength(); + + /** + *
+   * empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0)
+   * 
+ * + * bytes empty_child = 5 [json_name = "emptyChild"]; + * @return The emptyChild. + */ + com.google.protobuf.ByteString getEmptyChild(); + + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + *
+   * hash is the algorithm that must be used for each InnerOp
+   * 
+ * + * .icon.proto.core.commitment.HashOp hash = 6 [json_name = "hash"]; + * @return The hash. + */ + com.icon.proto.core.commitment.HashOp getHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOp.java new file mode 100644 index 000000000..75632aeb5 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOp.java @@ -0,0 +1,657 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ **
+ *LeafOp represents the raw key-value data we wish to prove, and
+ *must be flexible to represent the internal transformation from
+ *the original key-value pairs into the basis hash, for many existing
+ *merkle trees.
+ *key and value are passed in. So that the signature of this operation is:
+ *leafOp(key, value) -> output
+ *To process this, first prehash the keys and values if needed (ANY means no hash in this case):
+ *hkey = prehashKey(key)
+ *hvalue = prehashValue(value)
+ *Then combine the bytes, and hash it
+ *output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.LeafOp} + */ +public final class LeafOp extends + com.google.protobuf.GeneratedMessageLite< + LeafOp, LeafOp.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.LeafOp) + LeafOpOrBuilder { + private LeafOp() { + prefix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private int hash_; + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return hash_; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + com.icon.proto.core.commitment.HashOp result = com.icon.proto.core.commitment.HashOp.forNumber(hash_); + return result == null ? com.icon.proto.core.commitment.HashOp.UNRECOGNIZED : result; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + */ + private void setHashValue(int value) { + hash_ = value; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.icon.proto.core.commitment.HashOp value) { + hash_ = value.getNumber(); + + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = 0; + } + + public static final int PREHASH_KEY_FIELD_NUMBER = 2; + private int prehashKey_; + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + @java.lang.Override + public int getPrehashKeyValue() { + return prehashKey_; + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getPrehashKey() { + com.icon.proto.core.commitment.HashOp result = com.icon.proto.core.commitment.HashOp.forNumber(prehashKey_); + return result == null ? com.icon.proto.core.commitment.HashOp.UNRECOGNIZED : result; + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The enum numeric value on the wire for prehashKey to set. + */ + private void setPrehashKeyValue(int value) { + prehashKey_ = value; + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The prehashKey to set. + */ + private void setPrehashKey(com.icon.proto.core.commitment.HashOp value) { + prehashKey_ = value.getNumber(); + + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + */ + private void clearPrehashKey() { + + prehashKey_ = 0; + } + + public static final int PREHASH_VALUE_FIELD_NUMBER = 3; + private int prehashValue_; + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + @java.lang.Override + public int getPrehashValueValue() { + return prehashValue_; + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getPrehashValue() { + com.icon.proto.core.commitment.HashOp result = com.icon.proto.core.commitment.HashOp.forNumber(prehashValue_); + return result == null ? com.icon.proto.core.commitment.HashOp.UNRECOGNIZED : result; + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The enum numeric value on the wire for prehashValue to set. + */ + private void setPrehashValueValue(int value) { + prehashValue_ = value; + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The prehashValue to set. + */ + private void setPrehashValue(com.icon.proto.core.commitment.HashOp value) { + prehashValue_ = value.getNumber(); + + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + */ + private void clearPrehashValue() { + + prehashValue_ = 0; + } + + public static final int LENGTH_FIELD_NUMBER = 4; + private int length_; + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + @java.lang.Override + public int getLengthValue() { + return length_; + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + @java.lang.Override + public com.icon.proto.core.commitment.LengthOp getLength() { + com.icon.proto.core.commitment.LengthOp result = com.icon.proto.core.commitment.LengthOp.forNumber(length_); + return result == null ? com.icon.proto.core.commitment.LengthOp.UNRECOGNIZED : result; + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @param value The enum numeric value on the wire for length to set. + */ + private void setLengthValue(int value) { + length_ = value; + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @param value The length to set. + */ + private void setLength(com.icon.proto.core.commitment.LengthOp value) { + length_ = value.getNumber(); + + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + */ + private void clearLength() { + + length_ = 0; + } + + public static final int PREFIX_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString prefix_; + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return prefix_; + } + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @param value The prefix to set. + */ + private void setPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + prefix_ = value; + } + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + */ + private void clearPrefix() { + + prefix_ = getDefaultInstance().getPrefix(); + } + + public static com.icon.proto.core.commitment.LeafOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.LeafOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.LeafOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.LeafOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.LeafOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *LeafOp represents the raw key-value data we wish to prove, and
+   *must be flexible to represent the internal transformation from
+   *the original key-value pairs into the basis hash, for many existing
+   *merkle trees.
+   *key and value are passed in. So that the signature of this operation is:
+   *leafOp(key, value) -> output
+   *To process this, first prehash the keys and values if needed (ANY means no hash in this case):
+   *hkey = prehashKey(key)
+   *hvalue = prehashValue(value)
+   *Then combine the bytes, and hash it
+   *output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue)
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.LeafOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.LeafOp, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.LeafOp) + com.icon.proto.core.commitment.LeafOpOrBuilder { + // Construct using com.icon.proto.core.commitment.LeafOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + @java.lang.Override + public int getHashValue() { + return instance.getHashValue(); + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHashValue(int value) { + copyOnWrite(); + instance.setHashValue(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getHash() { + return instance.getHash(); + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @param value The enum numeric value on the wire for hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.icon.proto.core.commitment.HashOp value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + @java.lang.Override + public int getPrehashKeyValue() { + return instance.getPrehashKeyValue(); + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The prehashKey to set. + * @return This builder for chaining. + */ + public Builder setPrehashKeyValue(int value) { + copyOnWrite(); + instance.setPrehashKeyValue(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getPrehashKey() { + return instance.getPrehashKey(); + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @param value The enum numeric value on the wire for prehashKey to set. + * @return This builder for chaining. + */ + public Builder setPrehashKey(com.icon.proto.core.commitment.HashOp value) { + copyOnWrite(); + instance.setPrehashKey(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return This builder for chaining. + */ + public Builder clearPrehashKey() { + copyOnWrite(); + instance.clearPrehashKey(); + return this; + } + + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + @java.lang.Override + public int getPrehashValueValue() { + return instance.getPrehashValueValue(); + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The prehashValue to set. + * @return This builder for chaining. + */ + public Builder setPrehashValueValue(int value) { + copyOnWrite(); + instance.setPrehashValueValue(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + @java.lang.Override + public com.icon.proto.core.commitment.HashOp getPrehashValue() { + return instance.getPrehashValue(); + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @param value The enum numeric value on the wire for prehashValue to set. + * @return This builder for chaining. + */ + public Builder setPrehashValue(com.icon.proto.core.commitment.HashOp value) { + copyOnWrite(); + instance.setPrehashValue(value); + return this; + } + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return This builder for chaining. + */ + public Builder clearPrehashValue() { + copyOnWrite(); + instance.clearPrehashValue(); + return this; + } + + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + @java.lang.Override + public int getLengthValue() { + return instance.getLengthValue(); + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLengthValue(int value) { + copyOnWrite(); + instance.setLengthValue(value); + return this; + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + @java.lang.Override + public com.icon.proto.core.commitment.LengthOp getLength() { + return instance.getLength(); + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @param value The enum numeric value on the wire for length to set. + * @return This builder for chaining. + */ + public Builder setLength(com.icon.proto.core.commitment.LengthOp value) { + copyOnWrite(); + instance.setLength(value); + return this; + } + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return This builder for chaining. + */ + public Builder clearLength() { + copyOnWrite(); + instance.clearLength(); + return this; + } + + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrefix() { + return instance.getPrefix(); + } + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @param value The prefix to set. + * @return This builder for chaining. + */ + public Builder setPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPrefix(value); + return this; + } + /** + *
+     * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+     * a leaf node from an inner node.
+     * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return This builder for chaining. + */ + public Builder clearPrefix() { + copyOnWrite(); + instance.clearPrefix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.LeafOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.LeafOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + "prehashKey_", + "prehashValue_", + "length_", + "prefix_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\f\u0002\f\u0003" + + "\f\u0004\f\u0005\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.LeafOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.LeafOp) + private static final com.icon.proto.core.commitment.LeafOp DEFAULT_INSTANCE; + static { + LeafOp defaultInstance = new LeafOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + LeafOp.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.LeafOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOpOrBuilder.java new file mode 100644 index 000000000..c98a0768f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LeafOpOrBuilder.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface LeafOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.LeafOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The enum numeric value on the wire for hash. + */ + int getHashValue(); + /** + * .icon.proto.core.commitment.HashOp hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.icon.proto.core.commitment.HashOp getHash(); + + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The enum numeric value on the wire for prehashKey. + */ + int getPrehashKeyValue(); + /** + * .icon.proto.core.commitment.HashOp prehash_key = 2 [json_name = "prehashKey"]; + * @return The prehashKey. + */ + com.icon.proto.core.commitment.HashOp getPrehashKey(); + + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The enum numeric value on the wire for prehashValue. + */ + int getPrehashValueValue(); + /** + * .icon.proto.core.commitment.HashOp prehash_value = 3 [json_name = "prehashValue"]; + * @return The prehashValue. + */ + com.icon.proto.core.commitment.HashOp getPrehashValue(); + + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The enum numeric value on the wire for length. + */ + int getLengthValue(); + /** + * .icon.proto.core.commitment.LengthOp length = 4 [json_name = "length"]; + * @return The length. + */ + com.icon.proto.core.commitment.LengthOp getLength(); + + /** + *
+   * prefix is a fixed bytes that may optionally be included at the beginning to differentiate
+   * a leaf node from an inner node.
+   * 
+ * + * bytes prefix = 5 [json_name = "prefix"]; + * @return The prefix. + */ + com.google.protobuf.ByteString getPrefix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LengthOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LengthOp.java new file mode 100644 index 000000000..203a95b2a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/LengthOp.java @@ -0,0 +1,237 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ **
+ *LengthOp defines how to process the key and value of the LeafOp
+ *to include length information. After encoding the length with the given
+ *algorithm, the length will be prepended to the key and value bytes.
+ *(Each one with it's own encoded length)
+ * 
+ * + * Protobuf enum {@code icon.proto.core.commitment.LengthOp} + */ +public enum LengthOp + implements com.google.protobuf.Internal.EnumLite { + /** + *
+   * NO_PREFIX don't include any length info
+   * 
+ * + * NO_PREFIX = 0; + */ + NO_PREFIX(0), + /** + *
+   * VAR_PROTO uses protobuf (and go-amino) varint encoding of the length
+   * 
+ * + * VAR_PROTO = 1; + */ + VAR_PROTO(1), + /** + *
+   * VAR_RLP uses rlp int encoding of the length
+   * 
+ * + * VAR_RLP = 2; + */ + VAR_RLP(2), + /** + *
+   * FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_BIG = 3; + */ + FIXED32_BIG(3), + /** + *
+   * FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_LITTLE = 4; + */ + FIXED32_LITTLE(4), + /** + *
+   * FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_BIG = 5; + */ + FIXED64_BIG(5), + /** + *
+   * FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_LITTLE = 6; + */ + FIXED64_LITTLE(6), + /** + *
+   * REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output)
+   * 
+ * + * REQUIRE_32_BYTES = 7; + */ + REQUIRE_32_BYTES(7), + /** + *
+   * REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
+   * 
+ * + * REQUIRE_64_BYTES = 8; + */ + REQUIRE_64_BYTES(8), + UNRECOGNIZED(-1), + ; + + /** + *
+   * NO_PREFIX don't include any length info
+   * 
+ * + * NO_PREFIX = 0; + */ + public static final int NO_PREFIX_VALUE = 0; + /** + *
+   * VAR_PROTO uses protobuf (and go-amino) varint encoding of the length
+   * 
+ * + * VAR_PROTO = 1; + */ + public static final int VAR_PROTO_VALUE = 1; + /** + *
+   * VAR_RLP uses rlp int encoding of the length
+   * 
+ * + * VAR_RLP = 2; + */ + public static final int VAR_RLP_VALUE = 2; + /** + *
+   * FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_BIG = 3; + */ + public static final int FIXED32_BIG_VALUE = 3; + /** + *
+   * FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer
+   * 
+ * + * FIXED32_LITTLE = 4; + */ + public static final int FIXED32_LITTLE_VALUE = 4; + /** + *
+   * FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_BIG = 5; + */ + public static final int FIXED64_BIG_VALUE = 5; + /** + *
+   * FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer
+   * 
+ * + * FIXED64_LITTLE = 6; + */ + public static final int FIXED64_LITTLE_VALUE = 6; + /** + *
+   * REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output)
+   * 
+ * + * REQUIRE_32_BYTES = 7; + */ + public static final int REQUIRE_32_BYTES_VALUE = 7; + /** + *
+   * REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output)
+   * 
+ * + * REQUIRE_64_BYTES = 8; + */ + public static final int REQUIRE_64_BYTES_VALUE = 8; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static LengthOp valueOf(int value) { + return forNumber(value); + } + + public static LengthOp forNumber(int value) { + switch (value) { + case 0: return NO_PREFIX; + case 1: return VAR_PROTO; + case 2: return VAR_RLP; + case 3: return FIXED32_BIG; + case 4: return FIXED32_LITTLE; + case 5: return FIXED64_BIG; + case 6: return FIXED64_LITTLE; + case 7: return REQUIRE_32_BYTES; + case 8: return REQUIRE_64_BYTES; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + LengthOp> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public LengthOp findValueByNumber(int number) { + return LengthOp.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return LengthOpVerifier.INSTANCE; + } + + private static final class LengthOpVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new LengthOpVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return LengthOp.forNumber(number) != null; + } + }; + + private final int value; + + private LengthOp(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.proto.core.commitment.LengthOp) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePath.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePath.java new file mode 100644 index 000000000..09f901354 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePath.java @@ -0,0 +1,382 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * MerklePath is the path used to verify commitment proofs, which can be an
+ * arbitrary structured object (defined by a commitment type).
+ * MerklePath is represented from root-to-leaf
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerklePath} + */ +public final class MerklePath extends + com.google.protobuf.GeneratedMessageLite< + MerklePath, MerklePath.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.MerklePath) + MerklePathOrBuilder { + private MerklePath() { + keyPath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + public static final int KEY_PATH_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList keyPath_; + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + @java.lang.Override + public java.util.List getKeyPathList() { + return keyPath_; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + @java.lang.Override + public int getKeyPathCount() { + return keyPath_.size(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + @java.lang.Override + public java.lang.String getKeyPath(int index) { + return keyPath_.get(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the value to return. + * @return The bytes of the keyPath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyPathBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + keyPath_.get(index)); + } + private void ensureKeyPathIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + keyPath_; if (!tmp.isModifiable()) { + keyPath_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index to set the value at. + * @param value The keyPath to set. + */ + private void setKeyPath( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureKeyPathIsMutable(); + keyPath_.set(index, value); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The keyPath to add. + */ + private void addKeyPath( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureKeyPathIsMutable(); + keyPath_.add(value); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param values The keyPath to add. + */ + private void addAllKeyPath( + java.lang.Iterable values) { + ensureKeyPathIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, keyPath_); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + */ + private void clearKeyPath() { + keyPath_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The bytes of the keyPath to add. + */ + private void addKeyPathBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureKeyPathIsMutable(); + keyPath_.add(value.toStringUtf8()); + } + + public static com.icon.proto.core.commitment.MerklePath parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePath parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePath parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePath parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.MerklePath prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerklePath is the path used to verify commitment proofs, which can be an
+   * arbitrary structured object (defined by a commitment type).
+   * MerklePath is represented from root-to-leaf
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerklePath} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.MerklePath, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.MerklePath) + com.icon.proto.core.commitment.MerklePathOrBuilder { + // Construct using com.icon.proto.core.commitment.MerklePath.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + @java.lang.Override + public java.util.List + getKeyPathList() { + return java.util.Collections.unmodifiableList( + instance.getKeyPathList()); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + @java.lang.Override + public int getKeyPathCount() { + return instance.getKeyPathCount(); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + @java.lang.Override + public java.lang.String getKeyPath(int index) { + return instance.getKeyPath(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the value to return. + * @return The bytes of the keyPath at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyPathBytes(int index) { + return instance.getKeyPathBytes(index); + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index to set the value at. + * @param value The keyPath to set. + * @return This builder for chaining. + */ + public Builder setKeyPath( + int index, java.lang.String value) { + copyOnWrite(); + instance.setKeyPath(index, value); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The keyPath to add. + * @return This builder for chaining. + */ + public Builder addKeyPath( + java.lang.String value) { + copyOnWrite(); + instance.addKeyPath(value); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param values The keyPath to add. + * @return This builder for chaining. + */ + public Builder addAllKeyPath( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllKeyPath(values); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return This builder for chaining. + */ + public Builder clearKeyPath() { + copyOnWrite(); + instance.clearKeyPath(); + return this; + } + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param value The bytes of the keyPath to add. + * @return This builder for chaining. + */ + public Builder addKeyPathBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addKeyPathBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.MerklePath) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.MerklePath(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "keyPath_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u021a"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.MerklePath.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.MerklePath) + private static final com.icon.proto.core.commitment.MerklePath DEFAULT_INSTANCE; + static { + MerklePath defaultInstance = new MerklePath(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerklePath.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.MerklePath getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePathOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePathOrBuilder.java new file mode 100644 index 000000000..760474fda --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePathOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +public interface MerklePathOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.MerklePath) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return A list containing the keyPath. + */ + java.util.List + getKeyPathList(); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @return The count of keyPath. + */ + int getKeyPathCount(); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + java.lang.String getKeyPath(int index); + /** + * repeated string key_path = 1 [json_name = "keyPath"]; + * @param index The index of the element to return. + * @return The keyPath at the given index. + */ + com.google.protobuf.ByteString + getKeyPathBytes(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefix.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefix.java new file mode 100644 index 000000000..8233dcc36 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefix.java @@ -0,0 +1,252 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * MerklePrefix is merkle path prefixed to the key.
+ * The constructed key from the Path and the key will be append(Path.KeyPath,
+ * append(Path.KeyPrefix, key...))
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerklePrefix} + */ +public final class MerklePrefix extends + com.google.protobuf.GeneratedMessageLite< + MerklePrefix, MerklePrefix.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.MerklePrefix) + MerklePrefixOrBuilder { + private MerklePrefix() { + keyPrefix_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_PREFIX_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString keyPrefix_; + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPrefix() { + return keyPrefix_; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @param value The keyPrefix to set. + */ + private void setKeyPrefix(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + keyPrefix_ = value; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + */ + private void clearKeyPrefix() { + + keyPrefix_ = getDefaultInstance().getKeyPrefix(); + } + + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePrefix parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePrefix parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerklePrefix parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.MerklePrefix prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerklePrefix is merkle path prefixed to the key.
+   * The constructed key from the Path and the key will be append(Path.KeyPath,
+   * append(Path.KeyPrefix, key...))
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerklePrefix} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.MerklePrefix, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.MerklePrefix) + com.icon.proto.core.commitment.MerklePrefixOrBuilder { + // Construct using com.icon.proto.core.commitment.MerklePrefix.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKeyPrefix() { + return instance.getKeyPrefix(); + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @param value The keyPrefix to set. + * @return This builder for chaining. + */ + public Builder setKeyPrefix(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKeyPrefix(value); + return this; + } + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return This builder for chaining. + */ + public Builder clearKeyPrefix() { + copyOnWrite(); + instance.clearKeyPrefix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.MerklePrefix) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.MerklePrefix(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "keyPrefix_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.MerklePrefix.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.MerklePrefix) + private static final com.icon.proto.core.commitment.MerklePrefix DEFAULT_INSTANCE; + static { + MerklePrefix defaultInstance = new MerklePrefix(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerklePrefix.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.MerklePrefix getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefixOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefixOrBuilder.java new file mode 100644 index 000000000..ca35d7683 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerklePrefixOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +public interface MerklePrefixOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.MerklePrefix) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes key_prefix = 1 [json_name = "keyPrefix"]; + * @return The keyPrefix. + */ + com.google.protobuf.ByteString getKeyPrefix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProof.java new file mode 100644 index 000000000..513ad20d3 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProof.java @@ -0,0 +1,398 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * MerkleProof is a wrapper type over a chain of CommitmentProofs.
+ * It demonstrates membership or non-membership for an element or set of
+ * elements, verifiable in conjunction with a known commitment root. Proofs
+ * should be succinct.
+ * MerkleProofs are ordered from leaf-to-root
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerkleProof} + */ +public final class MerkleProof extends + com.google.protobuf.GeneratedMessageLite< + MerkleProof, MerkleProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.MerkleProof) + MerkleProofOrBuilder { + private MerkleProof() { + proofs_ = emptyProtobufList(); + } + public static final int PROOFS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList proofs_; + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return proofs_; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public java.util.List + getProofsOrBuilderList() { + return proofs_; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return proofs_.size(); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CommitmentProof getProofs(int index) { + return proofs_.get(index); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public com.icon.proto.core.commitment.CommitmentProofOrBuilder getProofsOrBuilder( + int index) { + return proofs_.get(index); + } + private void ensureProofsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = proofs_; + if (!tmp.isModifiable()) { + proofs_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void setProofs( + int index, com.icon.proto.core.commitment.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.set(index, value); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addProofs(com.icon.proto.core.commitment.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(value); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addProofs( + int index, com.icon.proto.core.commitment.CommitmentProof value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(index, value); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void addAllProofs( + java.lang.Iterable values) { + ensureProofsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, proofs_); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void clearProofs() { + proofs_ = emptyProtobufList(); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + private void removeProofs(int index) { + ensureProofsIsMutable(); + proofs_.remove(index); + } + + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.MerkleProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerkleProof is a wrapper type over a chain of CommitmentProofs.
+   * It demonstrates membership or non-membership for an element or set of
+   * elements, verifiable in conjunction with a known commitment root. Proofs
+   * should be succinct.
+   * MerkleProofs are ordered from leaf-to-root
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerkleProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.MerkleProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.MerkleProof) + com.icon.proto.core.commitment.MerkleProofOrBuilder { + // Construct using com.icon.proto.core.commitment.MerkleProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return java.util.Collections.unmodifiableList( + instance.getProofsList()); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return instance.getProofsCount(); + }/** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.CommitmentProof getProofs(int index) { + return instance.getProofs(index); + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.icon.proto.core.commitment.CommitmentProof value) { + copyOnWrite(); + instance.setProofs(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.icon.proto.core.commitment.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.setProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs(com.icon.proto.core.commitment.CommitmentProof value) { + copyOnWrite(); + instance.addProofs(value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.icon.proto.core.commitment.CommitmentProof value) { + copyOnWrite(); + instance.addProofs(index, value); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + com.icon.proto.core.commitment.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.icon.proto.core.commitment.CommitmentProof.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder addAllProofs( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllProofs(values); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder clearProofs() { + copyOnWrite(); + instance.clearProofs(); + return this; + } + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + public Builder removeProofs(int index) { + copyOnWrite(); + instance.removeProofs(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.MerkleProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.MerkleProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proofs_", + com.icon.proto.core.commitment.CommitmentProof.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.MerkleProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.MerkleProof) + private static final com.icon.proto.core.commitment.MerkleProof DEFAULT_INSTANCE; + static { + MerkleProof defaultInstance = new MerkleProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.MerkleProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProofOrBuilder.java new file mode 100644 index 000000000..d9bc04a70 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleProofOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +public interface MerkleProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.MerkleProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + java.util.List + getProofsList(); + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + com.icon.proto.core.commitment.CommitmentProof getProofs(int index); + /** + * repeated .icon.proto.core.commitment.CommitmentProof proofs = 1 [json_name = "proofs"]; + */ + int getProofsCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRoot.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRoot.java new file mode 100644 index 000000000..5a2fb6823 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRoot.java @@ -0,0 +1,250 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +/** + *
+ * MerkleRoot defines a merkle root hash.
+ * In the Cosmos SDK, the AppHash of a block header becomes the root.
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerkleRoot} + */ +public final class MerkleRoot extends + com.google.protobuf.GeneratedMessageLite< + MerkleRoot, MerkleRoot.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.MerkleRoot) + MerkleRootOrBuilder { + private MerkleRoot() { + hash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString hash_; + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return hash_; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + hash_ = value; + } + /** + * bytes hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = getDefaultInstance().getHash(); + } + + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleRoot parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleRoot parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.MerkleRoot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.MerkleRoot prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * MerkleRoot defines a merkle root hash.
+   * In the Cosmos SDK, the AppHash of a block header becomes the root.
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.MerkleRoot} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.MerkleRoot, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.MerkleRoot) + com.icon.proto.core.commitment.MerkleRootOrBuilder { + // Construct using com.icon.proto.core.commitment.MerkleRoot.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return instance.getHash(); + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.MerkleRoot) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.MerkleRoot(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.MerkleRoot.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.MerkleRoot) + private static final com.icon.proto.core.commitment.MerkleRoot DEFAULT_INSTANCE; + static { + MerkleRoot defaultInstance = new MerkleRoot(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleRoot.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.MerkleRoot getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRootOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRootOrBuilder.java new file mode 100644 index 000000000..f7954abe9 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/MerkleRootOrBuilder.java @@ -0,0 +1,15 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/commitment.proto + +package com.icon.proto.core.commitment; + +public interface MerkleRootOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.MerkleRoot) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.google.protobuf.ByteString getHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProof.java new file mode 100644 index 000000000..478694d77 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProof.java @@ -0,0 +1,465 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ *NonExistenceProof takes a proof of two neighbors, one left of the desired key,
+ *one right of the desired key. If both proofs are valid AND they are neighbors,
+ *then there is no valid proof for the given key.
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.NonExistenceProof} + */ +public final class NonExistenceProof extends + com.google.protobuf.GeneratedMessageLite< + NonExistenceProof, NonExistenceProof.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.NonExistenceProof) + NonExistenceProofOrBuilder { + private NonExistenceProof() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int LEFT_FIELD_NUMBER = 2; + private com.icon.proto.core.commitment.ExistenceProof left_; + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return left_ != null; + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getLeft() { + return left_ == null ? com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance() : left_; + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + private void setLeft(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + left_ = value; + + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeft(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + if (left_ != null && + left_ != com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance()) { + left_ = + com.icon.proto.core.commitment.ExistenceProof.newBuilder(left_).mergeFrom(value).buildPartial(); + } else { + left_ = value; + } + + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + private void clearLeft() { left_ = null; + + } + + public static final int RIGHT_FIELD_NUMBER = 3; + private com.icon.proto.core.commitment.ExistenceProof right_; + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return right_ != null; + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getRight() { + return right_ == null ? com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance() : right_; + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + private void setRight(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + right_ = value; + + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeRight(com.icon.proto.core.commitment.ExistenceProof value) { + value.getClass(); + if (right_ != null && + right_ != com.icon.proto.core.commitment.ExistenceProof.getDefaultInstance()) { + right_ = + com.icon.proto.core.commitment.ExistenceProof.newBuilder(right_).mergeFrom(value).buildPartial(); + } else { + right_ = value; + } + + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + private void clearRight() { right_ = null; + + } + + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.NonExistenceProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.NonExistenceProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   *NonExistenceProof takes a proof of two neighbors, one left of the desired key,
+   *one right of the desired key. If both proofs are valid AND they are neighbors,
+   *then there is no valid proof for the given key.
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.NonExistenceProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.NonExistenceProof, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.NonExistenceProof) + com.icon.proto.core.commitment.NonExistenceProofOrBuilder { + // Construct using com.icon.proto.core.commitment.NonExistenceProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + *
+     * TODO: remove this as unnecessary??? we prove a range
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public boolean hasLeft() { + return instance.hasLeft(); + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getLeft() { + return instance.getLeft(); + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.setLeft(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder setLeft( + com.icon.proto.core.commitment.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setLeft(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder mergeLeft(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.mergeLeft(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + */ + public Builder clearLeft() { copyOnWrite(); + instance.clearLeft(); + return this; + } + + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public boolean hasRight() { + return instance.hasRight(); + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.ExistenceProof getRight() { + return instance.getRight(); + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.setRight(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder setRight( + com.icon.proto.core.commitment.ExistenceProof.Builder builderForValue) { + copyOnWrite(); + instance.setRight(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder mergeRight(com.icon.proto.core.commitment.ExistenceProof value) { + copyOnWrite(); + instance.mergeRight(value); + return this; + } + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + */ + public Builder clearRight() { copyOnWrite(); + instance.clearRight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.NonExistenceProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.NonExistenceProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "left_", + "right_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + + "\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.NonExistenceProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.NonExistenceProof) + private static final com.icon.proto.core.commitment.NonExistenceProof DEFAULT_INSTANCE; + static { + NonExistenceProof defaultInstance = new NonExistenceProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + NonExistenceProof.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.NonExistenceProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProofOrBuilder.java new file mode 100644 index 000000000..9539514ef --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/NonExistenceProofOrBuilder.java @@ -0,0 +1,41 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface NonExistenceProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.NonExistenceProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * TODO: remove this as unnecessary??? we prove a range
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + * @return Whether the left field is set. + */ + boolean hasLeft(); + /** + * .icon.proto.core.commitment.ExistenceProof left = 2 [json_name = "left"]; + * @return The left. + */ + com.icon.proto.core.commitment.ExistenceProof getLeft(); + + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + * @return Whether the right field is set. + */ + boolean hasRight(); + /** + * .icon.proto.core.commitment.ExistenceProof right = 3 [json_name = "right"]; + * @return The right. + */ + com.icon.proto.core.commitment.ExistenceProof getRight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpec.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpec.java new file mode 100644 index 000000000..478a80ce8 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpec.java @@ -0,0 +1,700 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +/** + *
+ **
+ *ProofSpec defines what the expected parameters are for a given proof type.
+ *This can be stored in the client and used to validate any incoming proofs.
+ *verify(ProofSpec, Proof) -> Proof | Error
+ *As demonstrated in tests, if we don't fix the algorithm used to calculate the
+ *LeafHash for a given tree, there are many possible key-value pairs that can
+ *generate a given hash (by interpretting the preimage differently).
+ *We need this for proper security, requires client knows a priori what
+ *tree format server uses. But not in code, rather a configuration object.
+ * 
+ * + * Protobuf type {@code icon.proto.core.commitment.ProofSpec} + */ +public final class ProofSpec extends + com.google.protobuf.GeneratedMessageLite< + ProofSpec, ProofSpec.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.commitment.ProofSpec) + ProofSpecOrBuilder { + private ProofSpec() { + } + public static final int LEAF_SPEC_FIELD_NUMBER = 1; + private com.icon.proto.core.commitment.LeafOp leafSpec_; + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public boolean hasLeafSpec() { + return leafSpec_ != null; + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeafSpec() { + return leafSpec_ == null ? com.icon.proto.core.commitment.LeafOp.getDefaultInstance() : leafSpec_; + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + private void setLeafSpec(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + leafSpec_ = value; + + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLeafSpec(com.icon.proto.core.commitment.LeafOp value) { + value.getClass(); + if (leafSpec_ != null && + leafSpec_ != com.icon.proto.core.commitment.LeafOp.getDefaultInstance()) { + leafSpec_ = + com.icon.proto.core.commitment.LeafOp.newBuilder(leafSpec_).mergeFrom(value).buildPartial(); + } else { + leafSpec_ = value; + } + + } + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + private void clearLeafSpec() { leafSpec_ = null; + + } + + public static final int INNER_SPEC_FIELD_NUMBER = 2; + private com.icon.proto.core.commitment.InnerSpec innerSpec_; + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public boolean hasInnerSpec() { + return innerSpec_ != null; + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerSpec getInnerSpec() { + return innerSpec_ == null ? com.icon.proto.core.commitment.InnerSpec.getDefaultInstance() : innerSpec_; + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + private void setInnerSpec(com.icon.proto.core.commitment.InnerSpec value) { + value.getClass(); + innerSpec_ = value; + + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeInnerSpec(com.icon.proto.core.commitment.InnerSpec value) { + value.getClass(); + if (innerSpec_ != null && + innerSpec_ != com.icon.proto.core.commitment.InnerSpec.getDefaultInstance()) { + innerSpec_ = + com.icon.proto.core.commitment.InnerSpec.newBuilder(innerSpec_).mergeFrom(value).buildPartial(); + } else { + innerSpec_ = value; + } + + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + private void clearInnerSpec() { innerSpec_ = null; + + } + + public static final int MAX_DEPTH_FIELD_NUMBER = 3; + private int maxDepth_; + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + @java.lang.Override + public int getMaxDepth() { + return maxDepth_; + } + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @param value The maxDepth to set. + */ + private void setMaxDepth(int value) { + + maxDepth_ = value; + } + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + */ + private void clearMaxDepth() { + + maxDepth_ = 0; + } + + public static final int MIN_DEPTH_FIELD_NUMBER = 4; + private int minDepth_; + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + @java.lang.Override + public int getMinDepth() { + return minDepth_; + } + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @param value The minDepth to set. + */ + private void setMinDepth(int value) { + + minDepth_ = value; + } + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + */ + private void clearMinDepth() { + + minDepth_ = 0; + } + + public static final int PREHASH_KEY_BEFORE_COMPARISON_FIELD_NUMBER = 5; + private boolean prehashKeyBeforeComparison_; + /** + *
+   * prehash_key_before_comparison is a flag that indicates whether to use the
+   * prehash_key specified by LeafOp to compare lexical ordering of keys for
+   * non-existence proofs.
+   * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @return The prehashKeyBeforeComparison. + */ + @java.lang.Override + public boolean getPrehashKeyBeforeComparison() { + return prehashKeyBeforeComparison_; + } + /** + *
+   * prehash_key_before_comparison is a flag that indicates whether to use the
+   * prehash_key specified by LeafOp to compare lexical ordering of keys for
+   * non-existence proofs.
+   * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @param value The prehashKeyBeforeComparison to set. + */ + private void setPrehashKeyBeforeComparison(boolean value) { + + prehashKeyBeforeComparison_ = value; + } + /** + *
+   * prehash_key_before_comparison is a flag that indicates whether to use the
+   * prehash_key specified by LeafOp to compare lexical ordering of keys for
+   * non-existence proofs.
+   * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + */ + private void clearPrehashKeyBeforeComparison() { + + prehashKeyBeforeComparison_ = false; + } + + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.ProofSpec parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ProofSpec parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.commitment.ProofSpec parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.commitment.ProofSpec prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   **
+   *ProofSpec defines what the expected parameters are for a given proof type.
+   *This can be stored in the client and used to validate any incoming proofs.
+   *verify(ProofSpec, Proof) -> Proof | Error
+   *As demonstrated in tests, if we don't fix the algorithm used to calculate the
+   *LeafHash for a given tree, there are many possible key-value pairs that can
+   *generate a given hash (by interpretting the preimage differently).
+   *We need this for proper security, requires client knows a priori what
+   *tree format server uses. But not in code, rather a configuration object.
+   * 
+ * + * Protobuf type {@code icon.proto.core.commitment.ProofSpec} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.commitment.ProofSpec, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.commitment.ProofSpec) + com.icon.proto.core.commitment.ProofSpecOrBuilder { + // Construct using com.icon.proto.core.commitment.ProofSpec.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public boolean hasLeafSpec() { + return instance.hasLeafSpec(); + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.LeafOp getLeafSpec() { + return instance.getLeafSpec(); + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder setLeafSpec(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.setLeafSpec(value); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder setLeafSpec( + com.icon.proto.core.commitment.LeafOp.Builder builderForValue) { + copyOnWrite(); + instance.setLeafSpec(builderForValue.build()); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder mergeLeafSpec(com.icon.proto.core.commitment.LeafOp value) { + copyOnWrite(); + instance.mergeLeafSpec(value); + return this; + } + /** + *
+     * any field in the ExistenceProof must be the same as in this spec.
+     * except Prefix, which is just the first bytes of prefix (spec can be longer)
+     * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + */ + public Builder clearLeafSpec() { copyOnWrite(); + instance.clearLeafSpec(); + return this; + } + + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public boolean hasInnerSpec() { + return instance.hasInnerSpec(); + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.InnerSpec getInnerSpec() { + return instance.getInnerSpec(); + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder setInnerSpec(com.icon.proto.core.commitment.InnerSpec value) { + copyOnWrite(); + instance.setInnerSpec(value); + return this; + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder setInnerSpec( + com.icon.proto.core.commitment.InnerSpec.Builder builderForValue) { + copyOnWrite(); + instance.setInnerSpec(builderForValue.build()); + return this; + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder mergeInnerSpec(com.icon.proto.core.commitment.InnerSpec value) { + copyOnWrite(); + instance.mergeInnerSpec(value); + return this; + } + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + */ + public Builder clearInnerSpec() { copyOnWrite(); + instance.clearInnerSpec(); + return this; + } + + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + @java.lang.Override + public int getMaxDepth() { + return instance.getMaxDepth(); + } + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @param value The maxDepth to set. + * @return This builder for chaining. + */ + public Builder setMaxDepth(int value) { + copyOnWrite(); + instance.setMaxDepth(value); + return this; + } + /** + *
+     * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return This builder for chaining. + */ + public Builder clearMaxDepth() { + copyOnWrite(); + instance.clearMaxDepth(); + return this; + } + + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + @java.lang.Override + public int getMinDepth() { + return instance.getMinDepth(); + } + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @param value The minDepth to set. + * @return This builder for chaining. + */ + public Builder setMinDepth(int value) { + copyOnWrite(); + instance.setMinDepth(value); + return this; + } + /** + *
+     * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+     * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return This builder for chaining. + */ + public Builder clearMinDepth() { + copyOnWrite(); + instance.clearMinDepth(); + return this; + } + + /** + *
+     * prehash_key_before_comparison is a flag that indicates whether to use the
+     * prehash_key specified by LeafOp to compare lexical ordering of keys for
+     * non-existence proofs.
+     * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @return The prehashKeyBeforeComparison. + */ + @java.lang.Override + public boolean getPrehashKeyBeforeComparison() { + return instance.getPrehashKeyBeforeComparison(); + } + /** + *
+     * prehash_key_before_comparison is a flag that indicates whether to use the
+     * prehash_key specified by LeafOp to compare lexical ordering of keys for
+     * non-existence proofs.
+     * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @param value The prehashKeyBeforeComparison to set. + * @return This builder for chaining. + */ + public Builder setPrehashKeyBeforeComparison(boolean value) { + copyOnWrite(); + instance.setPrehashKeyBeforeComparison(value); + return this; + } + /** + *
+     * prehash_key_before_comparison is a flag that indicates whether to use the
+     * prehash_key specified by LeafOp to compare lexical ordering of keys for
+     * non-existence proofs.
+     * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @return This builder for chaining. + */ + public Builder clearPrehashKeyBeforeComparison() { + copyOnWrite(); + instance.clearPrehashKeyBeforeComparison(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.commitment.ProofSpec) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.commitment.ProofSpec(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "leafSpec_", + "innerSpec_", + "maxDepth_", + "minDepth_", + "prehashKeyBeforeComparison_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0000\u0000\u0001\t\u0002\t\u0003" + + "\u0004\u0004\u0004\u0005\u0007"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.commitment.ProofSpec.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.commitment.ProofSpec) + private static final com.icon.proto.core.commitment.ProofSpec DEFAULT_INSTANCE; + static { + ProofSpec defaultInstance = new ProofSpec(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ProofSpec.class, defaultInstance); + } + + public static com.icon.proto.core.commitment.ProofSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpecOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpecOrBuilder.java new file mode 100644 index 000000000..1173b9a69 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofSpecOrBuilder.java @@ -0,0 +1,73 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public interface ProofSpecOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.commitment.ProofSpec) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + * @return Whether the leafSpec field is set. + */ + boolean hasLeafSpec(); + /** + *
+   * any field in the ExistenceProof must be the same as in this spec.
+   * except Prefix, which is just the first bytes of prefix (spec can be longer)
+   * 
+ * + * .icon.proto.core.commitment.LeafOp leaf_spec = 1 [json_name = "leafSpec"]; + * @return The leafSpec. + */ + com.icon.proto.core.commitment.LeafOp getLeafSpec(); + + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + * @return Whether the innerSpec field is set. + */ + boolean hasInnerSpec(); + /** + * .icon.proto.core.commitment.InnerSpec inner_spec = 2 [json_name = "innerSpec"]; + * @return The innerSpec. + */ + com.icon.proto.core.commitment.InnerSpec getInnerSpec(); + + /** + *
+   * max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 max_depth = 3 [json_name = "maxDepth"]; + * @return The maxDepth. + */ + int getMaxDepth(); + + /** + *
+   * min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries)
+   * 
+ * + * int32 min_depth = 4 [json_name = "minDepth"]; + * @return The minDepth. + */ + int getMinDepth(); + + /** + *
+   * prehash_key_before_comparison is a flag that indicates whether to use the
+   * prehash_key specified by LeafOp to compare lexical ordering of keys for
+   * non-existence proofs.
+   * 
+ * + * bool prehash_key_before_comparison = 5 [json_name = "prehashKeyBeforeComparison"]; + * @return The prehashKeyBeforeComparison. + */ + boolean getPrehashKeyBeforeComparison(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofsProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofsProto.java new file mode 100644 index 000000000..cf5805e54 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/commitment/ProofsProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/23-commitment/proofs.proto + +package com.icon.proto.core.commitment; + +public final class ProofsProto { + private ProofsProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEnd.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEnd.java new file mode 100644 index 000000000..6b9d9ea43 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEnd.java @@ -0,0 +1,1154 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +/** + *
+ * ConnectionEnd defines a stateful object on a chain connected to another
+ * separate one.
+ * NOTE: there must only be 2 defined ConnectionEnds to establish
+ * a connection between two chains.
+ * 
+ * + * Protobuf type {@code icon.proto.core.connection.ConnectionEnd} + */ +public final class ConnectionEnd extends + com.google.protobuf.GeneratedMessageLite< + ConnectionEnd, ConnectionEnd.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.connection.ConnectionEnd) + ConnectionEndOrBuilder { + private ConnectionEnd() { + clientId_ = ""; + versions_ = emptyProtobufList(); + } + /** + *
+   * State defines if a connection is in one of the following states:
+   * INIT, TRYOPEN, OPEN or UNINITIALIZED.
+   * 
+ * + * Protobuf enum {@code icon.proto.core.connection.ConnectionEnd.State} + */ + public enum State + implements com.google.protobuf.Internal.EnumLite { + /** + *
+     * Default State
+     * 
+ * + * STATE_UNINITIALIZED_UNSPECIFIED = 0; + */ + STATE_UNINITIALIZED_UNSPECIFIED(0), + /** + *
+     * A connection end has just started the opening handshake.
+     * 
+ * + * STATE_INIT = 1; + */ + STATE_INIT(1), + /** + *
+     * A connection end has acknowledged the handshake step on the counterparty
+     * chain.
+     * 
+ * + * STATE_TRYOPEN = 2; + */ + STATE_TRYOPEN(2), + /** + *
+     * A connection end has completed the handshake.
+     * 
+ * + * STATE_OPEN = 3; + */ + STATE_OPEN(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Default State
+     * 
+ * + * STATE_UNINITIALIZED_UNSPECIFIED = 0; + */ + public static final int STATE_UNINITIALIZED_UNSPECIFIED_VALUE = 0; + /** + *
+     * A connection end has just started the opening handshake.
+     * 
+ * + * STATE_INIT = 1; + */ + public static final int STATE_INIT_VALUE = 1; + /** + *
+     * A connection end has acknowledged the handshake step on the counterparty
+     * chain.
+     * 
+ * + * STATE_TRYOPEN = 2; + */ + public static final int STATE_TRYOPEN_VALUE = 2; + /** + *
+     * A connection end has completed the handshake.
+     * 
+ * + * STATE_OPEN = 3; + */ + public static final int STATE_OPEN_VALUE = 3; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNINITIALIZED_UNSPECIFIED; + case 1: return STATE_INIT; + case 2: return STATE_TRYOPEN; + case 3: return STATE_OPEN; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + State> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public State findValueByNumber(int number) { + return State.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return StateVerifier.INSTANCE; + } + + private static final class StateVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new StateVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return State.forNumber(number) != null; + } + }; + + private final int value; + + private State(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.proto.core.connection.ConnectionEnd.State) + } + + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return clientId_; + } + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int VERSIONS_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList versions_; + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public java.util.List getVersionsList() { + return versions_; + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public java.util.List + getVersionsOrBuilderList() { + return versions_; + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public int getVersionsCount() { + return versions_.size(); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public com.icon.proto.core.connection.Version getVersions(int index) { + return versions_.get(index); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public com.icon.proto.core.connection.VersionOrBuilder getVersionsOrBuilder( + int index) { + return versions_.get(index); + } + private void ensureVersionsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = versions_; + if (!tmp.isModifiable()) { + versions_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void setVersions( + int index, com.icon.proto.core.connection.Version value) { + value.getClass(); + ensureVersionsIsMutable(); + versions_.set(index, value); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void addVersions(com.icon.proto.core.connection.Version value) { + value.getClass(); + ensureVersionsIsMutable(); + versions_.add(value); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void addVersions( + int index, com.icon.proto.core.connection.Version value) { + value.getClass(); + ensureVersionsIsMutable(); + versions_.add(index, value); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void addAllVersions( + java.lang.Iterable values) { + ensureVersionsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, versions_); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void clearVersions() { + versions_ = emptyProtobufList(); + } + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + private void removeVersions(int index) { + ensureVersionsIsMutable(); + versions_.remove(index); + } + + public static final int STATE_FIELD_NUMBER = 3; + private int state_; + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.connection.ConnectionEnd.State getState() { + com.icon.proto.core.connection.ConnectionEnd.State result = com.icon.proto.core.connection.ConnectionEnd.State.forNumber(state_); + return result == null ? com.icon.proto.core.connection.ConnectionEnd.State.UNRECOGNIZED : result; + } + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + */ + private void setStateValue(int value) { + state_ = value; + } + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @param value The state to set. + */ + private void setState(com.icon.proto.core.connection.ConnectionEnd.State value) { + state_ = value.getNumber(); + + } + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + */ + private void clearState() { + + state_ = 0; + } + + public static final int COUNTERPARTY_FIELD_NUMBER = 4; + private com.icon.proto.core.connection.Counterparty counterparty_; + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return counterparty_ != null; + } + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.connection.Counterparty getCounterparty() { + return counterparty_ == null ? com.icon.proto.core.connection.Counterparty.getDefaultInstance() : counterparty_; + } + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + private void setCounterparty(com.icon.proto.core.connection.Counterparty value) { + value.getClass(); + counterparty_ = value; + + } + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeCounterparty(com.icon.proto.core.connection.Counterparty value) { + value.getClass(); + if (counterparty_ != null && + counterparty_ != com.icon.proto.core.connection.Counterparty.getDefaultInstance()) { + counterparty_ = + com.icon.proto.core.connection.Counterparty.newBuilder(counterparty_).mergeFrom(value).buildPartial(); + } else { + counterparty_ = value; + } + + } + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + private void clearCounterparty() { counterparty_ = null; + + } + + public static final int DELAY_PERIOD_FIELD_NUMBER = 5; + private long delayPeriod_; + /** + *
+   * delay period that must pass before a consensus state can be used for
+   * packet-verification NOTE: delay period logic is only implemented by some
+   * clients.
+   * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @return The delayPeriod. + */ + @java.lang.Override + public long getDelayPeriod() { + return delayPeriod_; + } + /** + *
+   * delay period that must pass before a consensus state can be used for
+   * packet-verification NOTE: delay period logic is only implemented by some
+   * clients.
+   * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @param value The delayPeriod to set. + */ + private void setDelayPeriod(long value) { + + delayPeriod_ = value; + } + /** + *
+   * delay period that must pass before a consensus state can be used for
+   * packet-verification NOTE: delay period logic is only implemented by some
+   * clients.
+   * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + */ + private void clearDelayPeriod() { + + delayPeriod_ = 0L; + } + + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.ConnectionEnd parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.ConnectionEnd parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.ConnectionEnd parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.connection.ConnectionEnd prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ConnectionEnd defines a stateful object on a chain connected to another
+   * separate one.
+   * NOTE: there must only be 2 defined ConnectionEnds to establish
+   * a connection between two chains.
+   * 
+ * + * Protobuf type {@code icon.proto.core.connection.ConnectionEnd} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.connection.ConnectionEnd, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.connection.ConnectionEnd) + com.icon.proto.core.connection.ConnectionEndOrBuilder { + // Construct using com.icon.proto.core.connection.ConnectionEnd.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * client associated with this connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + *
+     * client associated with this connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + *
+     * client associated with this connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + *
+     * client associated with this connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return This builder for chaining. + */ + public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + *
+     * client associated with this connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public java.util.List getVersionsList() { + return java.util.Collections.unmodifiableList( + instance.getVersionsList()); + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public int getVersionsCount() { + return instance.getVersionsCount(); + }/** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + @java.lang.Override + public com.icon.proto.core.connection.Version getVersions(int index) { + return instance.getVersions(index); + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder setVersions( + int index, com.icon.proto.core.connection.Version value) { + copyOnWrite(); + instance.setVersions(index, value); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder setVersions( + int index, com.icon.proto.core.connection.Version.Builder builderForValue) { + copyOnWrite(); + instance.setVersions(index, + builderForValue.build()); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder addVersions(com.icon.proto.core.connection.Version value) { + copyOnWrite(); + instance.addVersions(value); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder addVersions( + int index, com.icon.proto.core.connection.Version value) { + copyOnWrite(); + instance.addVersions(index, value); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder addVersions( + com.icon.proto.core.connection.Version.Builder builderForValue) { + copyOnWrite(); + instance.addVersions(builderForValue.build()); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder addVersions( + int index, com.icon.proto.core.connection.Version.Builder builderForValue) { + copyOnWrite(); + instance.addVersions(index, + builderForValue.build()); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder addAllVersions( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllVersions(values); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder clearVersions() { + copyOnWrite(); + instance.clearVersions(); + return this; + } + /** + *
+     * IBC version which can be utilised to determine encodings or protocols for
+     * channels or packets utilising this connection.
+     * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + public Builder removeVersions(int index) { + copyOnWrite(); + instance.removeVersions(index); + return this; + } + + /** + *
+     * current state of the connection end.
+     * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return instance.getStateValue(); + } + /** + *
+     * current state of the connection end.
+     * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + copyOnWrite(); + instance.setStateValue(value); + return this; + } + /** + *
+     * current state of the connection end.
+     * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The state. + */ + @java.lang.Override + public com.icon.proto.core.connection.ConnectionEnd.State getState() { + return instance.getState(); + } + /** + *
+     * current state of the connection end.
+     * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setState(com.icon.proto.core.connection.ConnectionEnd.State value) { + copyOnWrite(); + instance.setState(value); + return this; + } + /** + *
+     * current state of the connection end.
+     * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return This builder for chaining. + */ + public Builder clearState() { + copyOnWrite(); + instance.clearState(); + return this; + } + + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + @java.lang.Override + public boolean hasCounterparty() { + return instance.hasCounterparty(); + } + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + @java.lang.Override + public com.icon.proto.core.connection.Counterparty getCounterparty() { + return instance.getCounterparty(); + } + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + public Builder setCounterparty(com.icon.proto.core.connection.Counterparty value) { + copyOnWrite(); + instance.setCounterparty(value); + return this; + } + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + public Builder setCounterparty( + com.icon.proto.core.connection.Counterparty.Builder builderForValue) { + copyOnWrite(); + instance.setCounterparty(builderForValue.build()); + return this; + } + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + public Builder mergeCounterparty(com.icon.proto.core.connection.Counterparty value) { + copyOnWrite(); + instance.mergeCounterparty(value); + return this; + } + /** + *
+     * counterparty chain associated with this connection.
+     * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + */ + public Builder clearCounterparty() { copyOnWrite(); + instance.clearCounterparty(); + return this; + } + + /** + *
+     * delay period that must pass before a consensus state can be used for
+     * packet-verification NOTE: delay period logic is only implemented by some
+     * clients.
+     * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @return The delayPeriod. + */ + @java.lang.Override + public long getDelayPeriod() { + return instance.getDelayPeriod(); + } + /** + *
+     * delay period that must pass before a consensus state can be used for
+     * packet-verification NOTE: delay period logic is only implemented by some
+     * clients.
+     * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @param value The delayPeriod to set. + * @return This builder for chaining. + */ + public Builder setDelayPeriod(long value) { + copyOnWrite(); + instance.setDelayPeriod(value); + return this; + } + /** + *
+     * delay period that must pass before a consensus state can be used for
+     * packet-verification NOTE: delay period logic is only implemented by some
+     * clients.
+     * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @return This builder for chaining. + */ + public Builder clearDelayPeriod() { + copyOnWrite(); + instance.clearDelayPeriod(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.connection.ConnectionEnd) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.connection.ConnectionEnd(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "versions_", + com.icon.proto.core.connection.Version.class, + "state_", + "counterparty_", + "delayPeriod_", + }; + java.lang.String info = + "\u0000\u0005\u0000\u0000\u0001\u0005\u0005\u0000\u0001\u0000\u0001\u0208\u0002\u001b" + + "\u0003\f\u0004\t\u0005\u0003"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.connection.ConnectionEnd.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.connection.ConnectionEnd) + private static final com.icon.proto.core.connection.ConnectionEnd DEFAULT_INSTANCE; + static { + ConnectionEnd defaultInstance = new ConnectionEnd(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ConnectionEnd.class, defaultInstance); + } + + public static com.icon.proto.core.connection.ConnectionEnd getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEndOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEndOrBuilder.java new file mode 100644 index 000000000..e7c3b6f03 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionEndOrBuilder.java @@ -0,0 +1,108 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +public interface ConnectionEndOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.connection.ConnectionEnd) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + java.lang.String getClientId(); + /** + *
+   * client associated with this connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + java.util.List + getVersionsList(); + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + com.icon.proto.core.connection.Version getVersions(int index); + /** + *
+   * IBC version which can be utilised to determine encodings or protocols for
+   * channels or packets utilising this connection.
+   * 
+ * + * repeated .icon.proto.core.connection.Version versions = 2 [json_name = "versions"]; + */ + int getVersionsCount(); + + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + *
+   * current state of the connection end.
+   * 
+ * + * .icon.proto.core.connection.ConnectionEnd.State state = 3 [json_name = "state"]; + * @return The state. + */ + com.icon.proto.core.connection.ConnectionEnd.State getState(); + + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + * @return Whether the counterparty field is set. + */ + boolean hasCounterparty(); + /** + *
+   * counterparty chain associated with this connection.
+   * 
+ * + * .icon.proto.core.connection.Counterparty counterparty = 4 [json_name = "counterparty"]; + * @return The counterparty. + */ + com.icon.proto.core.connection.Counterparty getCounterparty(); + + /** + *
+   * delay period that must pass before a consensus state can be used for
+   * packet-verification NOTE: delay period logic is only implemented by some
+   * clients.
+   * 
+ * + * uint64 delay_period = 5 [json_name = "delayPeriod"]; + * @return The delayPeriod. + */ + long getDelayPeriod(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionProto.java new file mode 100644 index 000000000..67a0a957c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/ConnectionProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +public final class ConnectionProto { + private ConnectionProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Counterparty.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Counterparty.java new file mode 100644 index 000000000..8ab948c5c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Counterparty.java @@ -0,0 +1,626 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +/** + *
+ * Counterparty defines the counterparty chain associated with a connection end.
+ * 
+ * + * Protobuf type {@code icon.proto.core.connection.Counterparty} + */ +public final class Counterparty extends + com.google.protobuf.GeneratedMessageLite< + Counterparty, Counterparty.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.connection.Counterparty) + CounterpartyOrBuilder { + private Counterparty() { + clientId_ = ""; + connectionId_ = ""; + } + public static final int CLIENT_ID_FIELD_NUMBER = 1; + private java.lang.String clientId_; + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return clientId_; + } + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(clientId_); + } + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + */ + private void setClientId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + clientId_ = value; + } + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + */ + private void clearClientId() { + + clientId_ = getDefaultInstance().getClientId(); + } + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + */ + private void setClientIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + clientId_ = value.toStringUtf8(); + + } + + public static final int CONNECTION_ID_FIELD_NUMBER = 2; + private java.lang.String connectionId_; + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The connectionId. + */ + @java.lang.Override + public java.lang.String getConnectionId() { + return connectionId_; + } + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The bytes for connectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(connectionId_); + } + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @param value The connectionId to set. + */ + private void setConnectionId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + connectionId_ = value; + } + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + */ + private void clearConnectionId() { + + connectionId_ = getDefaultInstance().getConnectionId(); + } + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @param value The bytes for connectionId to set. + */ + private void setConnectionIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + connectionId_ = value.toStringUtf8(); + + } + + public static final int PREFIX_FIELD_NUMBER = 3; + private com.icon.proto.core.commitment.MerklePrefix prefix_; + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + @java.lang.Override + public boolean hasPrefix() { + return prefix_ != null; + } + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.MerklePrefix getPrefix() { + return prefix_ == null ? com.icon.proto.core.commitment.MerklePrefix.getDefaultInstance() : prefix_; + } + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + private void setPrefix(com.icon.proto.core.commitment.MerklePrefix value) { + value.getClass(); + prefix_ = value; + + } + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePrefix(com.icon.proto.core.commitment.MerklePrefix value) { + value.getClass(); + if (prefix_ != null && + prefix_ != com.icon.proto.core.commitment.MerklePrefix.getDefaultInstance()) { + prefix_ = + com.icon.proto.core.commitment.MerklePrefix.newBuilder(prefix_).mergeFrom(value).buildPartial(); + } else { + prefix_ = value; + } + + } + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + private void clearPrefix() { prefix_ = null; + + } + + public static com.icon.proto.core.connection.Counterparty parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Counterparty parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Counterparty parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.Counterparty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Counterparty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Counterparty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.connection.Counterparty prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Counterparty defines the counterparty chain associated with a connection end.
+   * 
+ * + * Protobuf type {@code icon.proto.core.connection.Counterparty} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.connection.Counterparty, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.connection.Counterparty) + com.icon.proto.core.connection.CounterpartyOrBuilder { + // Construct using com.icon.proto.core.connection.Counterparty.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * identifies the client on the counterparty chain associated with a given
+     * connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + @java.lang.Override + public java.lang.String getClientId() { + return instance.getClientId(); + } + /** + *
+     * identifies the client on the counterparty chain associated with a given
+     * connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getClientIdBytes() { + return instance.getClientIdBytes(); + } + /** + *
+     * identifies the client on the counterparty chain associated with a given
+     * connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The clientId to set. + * @return This builder for chaining. + */ + public Builder setClientId( + java.lang.String value) { + copyOnWrite(); + instance.setClientId(value); + return this; + } + /** + *
+     * identifies the client on the counterparty chain associated with a given
+     * connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return This builder for chaining. + */ + public Builder clearClientId() { + copyOnWrite(); + instance.clearClientId(); + return this; + } + /** + *
+     * identifies the client on the counterparty chain associated with a given
+     * connection.
+     * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @param value The bytes for clientId to set. + * @return This builder for chaining. + */ + public Builder setClientIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setClientIdBytes(value); + return this; + } + + /** + *
+     * identifies the connection end on the counterparty chain associated with a
+     * given connection.
+     * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The connectionId. + */ + @java.lang.Override + public java.lang.String getConnectionId() { + return instance.getConnectionId(); + } + /** + *
+     * identifies the connection end on the counterparty chain associated with a
+     * given connection.
+     * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The bytes for connectionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getConnectionIdBytes() { + return instance.getConnectionIdBytes(); + } + /** + *
+     * identifies the connection end on the counterparty chain associated with a
+     * given connection.
+     * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @param value The connectionId to set. + * @return This builder for chaining. + */ + public Builder setConnectionId( + java.lang.String value) { + copyOnWrite(); + instance.setConnectionId(value); + return this; + } + /** + *
+     * identifies the connection end on the counterparty chain associated with a
+     * given connection.
+     * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return This builder for chaining. + */ + public Builder clearConnectionId() { + copyOnWrite(); + instance.clearConnectionId(); + return this; + } + /** + *
+     * identifies the connection end on the counterparty chain associated with a
+     * given connection.
+     * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @param value The bytes for connectionId to set. + * @return This builder for chaining. + */ + public Builder setConnectionIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setConnectionIdBytes(value); + return this; + } + + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + @java.lang.Override + public boolean hasPrefix() { + return instance.hasPrefix(); + } + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + @java.lang.Override + public com.icon.proto.core.commitment.MerklePrefix getPrefix() { + return instance.getPrefix(); + } + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + public Builder setPrefix(com.icon.proto.core.commitment.MerklePrefix value) { + copyOnWrite(); + instance.setPrefix(value); + return this; + } + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + public Builder setPrefix( + com.icon.proto.core.commitment.MerklePrefix.Builder builderForValue) { + copyOnWrite(); + instance.setPrefix(builderForValue.build()); + return this; + } + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + public Builder mergePrefix(com.icon.proto.core.commitment.MerklePrefix value) { + copyOnWrite(); + instance.mergePrefix(value); + return this; + } + /** + *
+     * commitment merkle prefix of the counterparty chain.
+     * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + */ + public Builder clearPrefix() { copyOnWrite(); + instance.clearPrefix(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.connection.Counterparty) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.connection.Counterparty(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "clientId_", + "connectionId_", + "prefix_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.connection.Counterparty.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.connection.Counterparty) + private static final com.icon.proto.core.connection.Counterparty DEFAULT_INSTANCE; + static { + Counterparty defaultInstance = new Counterparty(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Counterparty.class, defaultInstance); + } + + public static com.icon.proto.core.connection.Counterparty getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/CounterpartyOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/CounterpartyOrBuilder.java new file mode 100644 index 000000000..851ee2018 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/CounterpartyOrBuilder.java @@ -0,0 +1,72 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +public interface CounterpartyOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.connection.Counterparty) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The clientId. + */ + java.lang.String getClientId(); + /** + *
+   * identifies the client on the counterparty chain associated with a given
+   * connection.
+   * 
+ * + * string client_id = 1 [json_name = "clientId"]; + * @return The bytes for clientId. + */ + com.google.protobuf.ByteString + getClientIdBytes(); + + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The connectionId. + */ + java.lang.String getConnectionId(); + /** + *
+   * identifies the connection end on the counterparty chain associated with a
+   * given connection.
+   * 
+ * + * string connection_id = 2 [json_name = "connectionId"]; + * @return The bytes for connectionId. + */ + com.google.protobuf.ByteString + getConnectionIdBytes(); + + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + * @return Whether the prefix field is set. + */ + boolean hasPrefix(); + /** + *
+   * commitment merkle prefix of the counterparty chain.
+   * 
+ * + * .icon.proto.core.commitment.MerklePrefix prefix = 3 [json_name = "prefix"]; + * @return The prefix. + */ + com.icon.proto.core.commitment.MerklePrefix getPrefix(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Version.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Version.java new file mode 100644 index 000000000..904653be9 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/Version.java @@ -0,0 +1,591 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +/** + *
+ * Version defines the versioning scheme used to negotiate the IBC verison in
+ * the connection handshake.
+ * 
+ * + * Protobuf type {@code icon.proto.core.connection.Version} + */ +public final class Version extends + com.google.protobuf.GeneratedMessageLite< + Version, Version.Builder> implements + // @@protoc_insertion_point(message_implements:icon.proto.core.connection.Version) + VersionOrBuilder { + private Version() { + identifier_ = ""; + features_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + public static final int IDENTIFIER_FIELD_NUMBER = 1; + private java.lang.String identifier_; + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The identifier. + */ + @java.lang.Override + public java.lang.String getIdentifier() { + return identifier_; + } + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The bytes for identifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdentifierBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(identifier_); + } + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @param value The identifier to set. + */ + private void setIdentifier( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + identifier_ = value; + } + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + */ + private void clearIdentifier() { + + identifier_ = getDefaultInstance().getIdentifier(); + } + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @param value The bytes for identifier to set. + */ + private void setIdentifierBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + identifier_ = value.toStringUtf8(); + + } + + public static final int FEATURES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList features_; + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return A list containing the features. + */ + @java.lang.Override + public java.util.List getFeaturesList() { + return features_; + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return The count of features. + */ + @java.lang.Override + public int getFeaturesCount() { + return features_.size(); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the element to return. + * @return The features at the given index. + */ + @java.lang.Override + public java.lang.String getFeatures(int index) { + return features_.get(index); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the value to return. + * @return The bytes of the features at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeaturesBytes(int index) { + return com.google.protobuf.ByteString.copyFromUtf8( + features_.get(index)); + } + private void ensureFeaturesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = + features_; if (!tmp.isModifiable()) { + features_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index to set the value at. + * @param value The features to set. + */ + private void setFeatures( + int index, java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureFeaturesIsMutable(); + features_.set(index, value); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param value The features to add. + */ + private void addFeatures( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + ensureFeaturesIsMutable(); + features_.add(value); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param values The features to add. + */ + private void addAllFeatures( + java.lang.Iterable values) { + ensureFeaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, features_); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + */ + private void clearFeatures() { + features_ = com.google.protobuf.GeneratedMessageLite.emptyProtobufList(); + } + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param value The bytes of the features to add. + */ + private void addFeaturesBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + ensureFeaturesIsMutable(); + features_.add(value.toStringUtf8()); + } + + public static com.icon.proto.core.connection.Version parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Version parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Version parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Version parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Version parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.proto.core.connection.Version parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.proto.core.connection.Version parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Version parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.Version parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Version parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.proto.core.connection.Version parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.proto.core.connection.Version parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.proto.core.connection.Version prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Version defines the versioning scheme used to negotiate the IBC verison in
+   * the connection handshake.
+   * 
+ * + * Protobuf type {@code icon.proto.core.connection.Version} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.proto.core.connection.Version, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.proto.core.connection.Version) + com.icon.proto.core.connection.VersionOrBuilder { + // Construct using com.icon.proto.core.connection.Version.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * unique version identifier
+     * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The identifier. + */ + @java.lang.Override + public java.lang.String getIdentifier() { + return instance.getIdentifier(); + } + /** + *
+     * unique version identifier
+     * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The bytes for identifier. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdentifierBytes() { + return instance.getIdentifierBytes(); + } + /** + *
+     * unique version identifier
+     * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @param value The identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifier( + java.lang.String value) { + copyOnWrite(); + instance.setIdentifier(value); + return this; + } + /** + *
+     * unique version identifier
+     * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return This builder for chaining. + */ + public Builder clearIdentifier() { + copyOnWrite(); + instance.clearIdentifier(); + return this; + } + /** + *
+     * unique version identifier
+     * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @param value The bytes for identifier to set. + * @return This builder for chaining. + */ + public Builder setIdentifierBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setIdentifierBytes(value); + return this; + } + + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return A list containing the features. + */ + @java.lang.Override + public java.util.List + getFeaturesList() { + return java.util.Collections.unmodifiableList( + instance.getFeaturesList()); + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return The count of features. + */ + @java.lang.Override + public int getFeaturesCount() { + return instance.getFeaturesCount(); + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the element to return. + * @return The features at the given index. + */ + @java.lang.Override + public java.lang.String getFeatures(int index) { + return instance.getFeatures(index); + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the value to return. + * @return The bytes of the features at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFeaturesBytes(int index) { + return instance.getFeaturesBytes(index); + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index to set the value at. + * @param value The features to set. + * @return This builder for chaining. + */ + public Builder setFeatures( + int index, java.lang.String value) { + copyOnWrite(); + instance.setFeatures(index, value); + return this; + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param value The features to add. + * @return This builder for chaining. + */ + public Builder addFeatures( + java.lang.String value) { + copyOnWrite(); + instance.addFeatures(value); + return this; + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param values The features to add. + * @return This builder for chaining. + */ + public Builder addAllFeatures( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllFeatures(values); + return this; + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return This builder for chaining. + */ + public Builder clearFeatures() { + copyOnWrite(); + instance.clearFeatures(); + return this; + } + /** + *
+     * list of features compatible with the specified identifier
+     * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param value The bytes of the features to add. + * @return This builder for chaining. + */ + public Builder addFeaturesBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addFeaturesBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.proto.core.connection.Version) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.proto.core.connection.Version(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "identifier_", + "features_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0001\u0000\u0001\u0208\u0002\u021a" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.proto.core.connection.Version.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.proto.core.connection.Version) + private static final com.icon.proto.core.connection.Version DEFAULT_INSTANCE; + static { + Version defaultInstance = new Version(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Version.class, defaultInstance); + } + + public static com.icon.proto.core.connection.Version getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/VersionOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/VersionOrBuilder.java new file mode 100644 index 000000000..ef70c7d92 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/proto/core/connection/VersionOrBuilder.java @@ -0,0 +1,70 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: core/03-connection/Connection.proto + +package com.icon.proto.core.connection; + +public interface VersionOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.proto.core.connection.Version) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The identifier. + */ + java.lang.String getIdentifier(); + /** + *
+   * unique version identifier
+   * 
+ * + * string identifier = 1 [json_name = "identifier"]; + * @return The bytes for identifier. + */ + com.google.protobuf.ByteString + getIdentifierBytes(); + + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return A list containing the features. + */ + java.util.List + getFeaturesList(); + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @return The count of features. + */ + int getFeaturesCount(); + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the element to return. + * @return The features at the given index. + */ + java.lang.String getFeatures(int index); + /** + *
+   * list of features compatible with the specified identifier
+   * 
+ * + * repeated string features = 2 [json_name = "features"]; + * @param index The index of the element to return. + * @return The features at the given index. + */ + com.google.protobuf.ByteString + getFeaturesBytes(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeader.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeader.java new file mode 100644 index 000000000..6f0a21de5 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeader.java @@ -0,0 +1,972 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + * Protobuf type {@code icon.types.v1.BTPHeader} + */ +public final class BTPHeader extends + com.google.protobuf.GeneratedMessageLite< + BTPHeader, BTPHeader.Builder> implements + // @@protoc_insertion_point(message_implements:icon.types.v1.BTPHeader) + BTPHeaderOrBuilder { + private BTPHeader() { + nextProofContextHash_ = com.google.protobuf.ByteString.EMPTY; + networkSectionToRoot_ = emptyProtobufList(); + prevNetworkSectionHash_ = com.google.protobuf.ByteString.EMPTY; + messageRoot_ = com.google.protobuf.ByteString.EMPTY; + nextValidators_ = emptyProtobufList(); + } + public static final int MAIN_HEIGHT_FIELD_NUMBER = 1; + private long mainHeight_; + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @return The mainHeight. + */ + @java.lang.Override + public long getMainHeight() { + return mainHeight_; + } + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @param value The mainHeight to set. + */ + private void setMainHeight(long value) { + + mainHeight_ = value; + } + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + */ + private void clearMainHeight() { + + mainHeight_ = 0L; + } + + public static final int ROUND_FIELD_NUMBER = 2; + private int round_; + /** + * uint32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + * uint32 round = 2 [json_name = "round"]; + * @param value The round to set. + */ + private void setRound(int value) { + + round_ = value; + } + /** + * uint32 round = 2 [json_name = "round"]; + */ + private void clearRound() { + + round_ = 0; + } + + public static final int NEXT_PROOF_CONTEXT_HASH_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString nextProofContextHash_; + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextProofContextHash() { + return nextProofContextHash_; + } + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @param value The nextProofContextHash to set. + */ + private void setNextProofContextHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + nextProofContextHash_ = value; + } + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + */ + private void clearNextProofContextHash() { + + nextProofContextHash_ = getDefaultInstance().getNextProofContextHash(); + } + + public static final int NETWORK_SECTION_TO_ROOT_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList networkSectionToRoot_; + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public java.util.List getNetworkSectionToRootList() { + return networkSectionToRoot_; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public java.util.List + getNetworkSectionToRootOrBuilderList() { + return networkSectionToRoot_; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public int getNetworkSectionToRootCount() { + return networkSectionToRoot_.size(); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public com.icon.types.v1.MerkleNode getNetworkSectionToRoot(int index) { + return networkSectionToRoot_.get(index); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public com.icon.types.v1.MerkleNodeOrBuilder getNetworkSectionToRootOrBuilder( + int index) { + return networkSectionToRoot_.get(index); + } + private void ensureNetworkSectionToRootIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = networkSectionToRoot_; + if (!tmp.isModifiable()) { + networkSectionToRoot_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void setNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureNetworkSectionToRootIsMutable(); + networkSectionToRoot_.set(index, value); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void addNetworkSectionToRoot(com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureNetworkSectionToRootIsMutable(); + networkSectionToRoot_.add(value); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void addNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureNetworkSectionToRootIsMutable(); + networkSectionToRoot_.add(index, value); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void addAllNetworkSectionToRoot( + java.lang.Iterable values) { + ensureNetworkSectionToRootIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, networkSectionToRoot_); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void clearNetworkSectionToRoot() { + networkSectionToRoot_ = emptyProtobufList(); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + private void removeNetworkSectionToRoot(int index) { + ensureNetworkSectionToRootIsMutable(); + networkSectionToRoot_.remove(index); + } + + public static final int NETWORK_ID_FIELD_NUMBER = 5; + private long networkId_; + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @return The networkId. + */ + @java.lang.Override + public long getNetworkId() { + return networkId_; + } + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @param value The networkId to set. + */ + private void setNetworkId(long value) { + + networkId_ = value; + } + /** + * uint64 network_id = 5 [json_name = "networkId"]; + */ + private void clearNetworkId() { + + networkId_ = 0L; + } + + public static final int UPDATE_NUMBER_FIELD_NUMBER = 6; + private long updateNumber_; + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @return The updateNumber. + */ + @java.lang.Override + public long getUpdateNumber() { + return updateNumber_; + } + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @param value The updateNumber to set. + */ + private void setUpdateNumber(long value) { + + updateNumber_ = value; + } + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + */ + private void clearUpdateNumber() { + + updateNumber_ = 0L; + } + + public static final int PREV_NETWORK_SECTION_HASH_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString prevNetworkSectionHash_; + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @return The prevNetworkSectionHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrevNetworkSectionHash() { + return prevNetworkSectionHash_; + } + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @param value The prevNetworkSectionHash to set. + */ + private void setPrevNetworkSectionHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + prevNetworkSectionHash_ = value; + } + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + */ + private void clearPrevNetworkSectionHash() { + + prevNetworkSectionHash_ = getDefaultInstance().getPrevNetworkSectionHash(); + } + + public static final int MESSAGE_COUNT_FIELD_NUMBER = 8; + private long messageCount_; + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @return The messageCount. + */ + @java.lang.Override + public long getMessageCount() { + return messageCount_; + } + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @param value The messageCount to set. + */ + private void setMessageCount(long value) { + + messageCount_ = value; + } + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + */ + private void clearMessageCount() { + + messageCount_ = 0L; + } + + public static final int MESSAGE_ROOT_FIELD_NUMBER = 9; + private com.google.protobuf.ByteString messageRoot_; + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageRoot() { + return messageRoot_; + } + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @param value The messageRoot to set. + */ + private void setMessageRoot(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + messageRoot_ = value; + } + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + */ + private void clearMessageRoot() { + + messageRoot_ = getDefaultInstance().getMessageRoot(); + } + + public static final int NEXTVALIDATORS_FIELD_NUMBER = 10; + private com.google.protobuf.Internal.ProtobufList nextValidators_; + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return A list containing the nextValidators. + */ + @java.lang.Override + public java.util.List + getNextValidatorsList() { + return nextValidators_; + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return The count of nextValidators. + */ + @java.lang.Override + public int getNextValidatorsCount() { + return nextValidators_.size(); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param index The index of the element to return. + * @return The nextValidators at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidators(int index) { + return nextValidators_.get(index); + } + private void ensureNextValidatorsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = nextValidators_; + if (!tmp.isModifiable()) { + nextValidators_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param index The index to set the value at. + * @param value The nextValidators to set. + */ + private void setNextValidators( + int index, com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureNextValidatorsIsMutable(); + nextValidators_.set(index, value); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param value The nextValidators to add. + */ + private void addNextValidators(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureNextValidatorsIsMutable(); + nextValidators_.add(value); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param values The nextValidators to add. + */ + private void addAllNextValidators( + java.lang.Iterable values) { + ensureNextValidatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, nextValidators_); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + */ + private void clearNextValidators() { + nextValidators_ = emptyProtobufList(); + } + + public static com.icon.types.v1.BTPHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.BTPHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.BTPHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.BTPHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.BTPHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.BTPHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.BTPHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.BTPHeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.BTPHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.BTPHeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.BTPHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.BTPHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.types.v1.BTPHeader prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.types.v1.BTPHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.types.v1.BTPHeader, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.types.v1.BTPHeader) + com.icon.types.v1.BTPHeaderOrBuilder { + // Construct using com.icon.types.v1.BTPHeader.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @return The mainHeight. + */ + @java.lang.Override + public long getMainHeight() { + return instance.getMainHeight(); + } + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @param value The mainHeight to set. + * @return This builder for chaining. + */ + public Builder setMainHeight(long value) { + copyOnWrite(); + instance.setMainHeight(value); + return this; + } + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @return This builder for chaining. + */ + public Builder clearMainHeight() { + copyOnWrite(); + instance.clearMainHeight(); + return this; + } + + /** + * uint32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return instance.getRound(); + } + /** + * uint32 round = 2 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + copyOnWrite(); + instance.setRound(value); + return this; + } + /** + * uint32 round = 2 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + copyOnWrite(); + instance.clearRound(); + return this; + } + + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextProofContextHash() { + return instance.getNextProofContextHash(); + } + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @param value The nextProofContextHash to set. + * @return This builder for chaining. + */ + public Builder setNextProofContextHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNextProofContextHash(value); + return this; + } + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @return This builder for chaining. + */ + public Builder clearNextProofContextHash() { + copyOnWrite(); + instance.clearNextProofContextHash(); + return this; + } + + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public java.util.List getNetworkSectionToRootList() { + return java.util.Collections.unmodifiableList( + instance.getNetworkSectionToRootList()); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public int getNetworkSectionToRootCount() { + return instance.getNetworkSectionToRootCount(); + }/** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + @java.lang.Override + public com.icon.types.v1.MerkleNode getNetworkSectionToRoot(int index) { + return instance.getNetworkSectionToRoot(index); + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder setNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.setNetworkSectionToRoot(index, value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder setNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.setNetworkSectionToRoot(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder addNetworkSectionToRoot(com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.addNetworkSectionToRoot(value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder addNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.addNetworkSectionToRoot(index, value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder addNetworkSectionToRoot( + com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.addNetworkSectionToRoot(builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder addNetworkSectionToRoot( + int index, com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.addNetworkSectionToRoot(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder addAllNetworkSectionToRoot( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllNetworkSectionToRoot(values); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder clearNetworkSectionToRoot() { + copyOnWrite(); + instance.clearNetworkSectionToRoot(); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + public Builder removeNetworkSectionToRoot(int index) { + copyOnWrite(); + instance.removeNetworkSectionToRoot(index); + return this; + } + + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @return The networkId. + */ + @java.lang.Override + public long getNetworkId() { + return instance.getNetworkId(); + } + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @param value The networkId to set. + * @return This builder for chaining. + */ + public Builder setNetworkId(long value) { + copyOnWrite(); + instance.setNetworkId(value); + return this; + } + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @return This builder for chaining. + */ + public Builder clearNetworkId() { + copyOnWrite(); + instance.clearNetworkId(); + return this; + } + + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @return The updateNumber. + */ + @java.lang.Override + public long getUpdateNumber() { + return instance.getUpdateNumber(); + } + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @param value The updateNumber to set. + * @return This builder for chaining. + */ + public Builder setUpdateNumber(long value) { + copyOnWrite(); + instance.setUpdateNumber(value); + return this; + } + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @return This builder for chaining. + */ + public Builder clearUpdateNumber() { + copyOnWrite(); + instance.clearUpdateNumber(); + return this; + } + + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @return The prevNetworkSectionHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrevNetworkSectionHash() { + return instance.getPrevNetworkSectionHash(); + } + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @param value The prevNetworkSectionHash to set. + * @return This builder for chaining. + */ + public Builder setPrevNetworkSectionHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setPrevNetworkSectionHash(value); + return this; + } + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @return This builder for chaining. + */ + public Builder clearPrevNetworkSectionHash() { + copyOnWrite(); + instance.clearPrevNetworkSectionHash(); + return this; + } + + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @return The messageCount. + */ + @java.lang.Override + public long getMessageCount() { + return instance.getMessageCount(); + } + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @param value The messageCount to set. + * @return This builder for chaining. + */ + public Builder setMessageCount(long value) { + copyOnWrite(); + instance.setMessageCount(value); + return this; + } + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @return This builder for chaining. + */ + public Builder clearMessageCount() { + copyOnWrite(); + instance.clearMessageCount(); + return this; + } + + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageRoot() { + return instance.getMessageRoot(); + } + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @param value The messageRoot to set. + * @return This builder for chaining. + */ + public Builder setMessageRoot(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setMessageRoot(value); + return this; + } + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @return This builder for chaining. + */ + public Builder clearMessageRoot() { + copyOnWrite(); + instance.clearMessageRoot(); + return this; + } + + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return A list containing the nextValidators. + */ + @java.lang.Override + public java.util.List + getNextValidatorsList() { + return java.util.Collections.unmodifiableList( + instance.getNextValidatorsList()); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return The count of nextValidators. + */ + @java.lang.Override + public int getNextValidatorsCount() { + return instance.getNextValidatorsCount(); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param index The index of the element to return. + * @return The nextValidators at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidators(int index) { + return instance.getNextValidators(index); + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param value The nextValidators to set. + * @return This builder for chaining. + */ + public Builder setNextValidators( + int index, com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNextValidators(index, value); + return this; + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param value The nextValidators to add. + * @return This builder for chaining. + */ + public Builder addNextValidators(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addNextValidators(value); + return this; + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param values The nextValidators to add. + * @return This builder for chaining. + */ + public Builder addAllNextValidators( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllNextValidators(values); + return this; + } + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return This builder for chaining. + */ + public Builder clearNextValidators() { + copyOnWrite(); + instance.clearNextValidators(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.types.v1.BTPHeader) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.types.v1.BTPHeader(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "mainHeight_", + "round_", + "nextProofContextHash_", + "networkSectionToRoot_", + com.icon.types.v1.MerkleNode.class, + "networkId_", + "updateNumber_", + "prevNetworkSectionHash_", + "messageCount_", + "messageRoot_", + "nextValidators_", + }; + java.lang.String info = + "\u0000\n\u0000\u0000\u0001\n\n\u0000\u0002\u0000\u0001\u0003\u0002\u000b\u0003\n" + + "\u0004\u001b\u0005\u0003\u0006\u0003\u0007\n\b\u0003\t\n\n\u001c"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.types.v1.BTPHeader.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.types.v1.BTPHeader) + private static final com.icon.types.v1.BTPHeader DEFAULT_INSTANCE; + static { + BTPHeader defaultInstance = new BTPHeader(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BTPHeader.class, defaultInstance); + } + + public static com.icon.types.v1.BTPHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeaderOrBuilder.java new file mode 100644 index 000000000..beebb1e56 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BTPHeaderOrBuilder.java @@ -0,0 +1,88 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +public interface BTPHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.types.v1.BTPHeader) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 main_height = 1 [json_name = "mainHeight"]; + * @return The mainHeight. + */ + long getMainHeight(); + + /** + * uint32 round = 2 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + * bytes next_proof_context_hash = 3 [json_name = "nextProofContextHash"]; + * @return The nextProofContextHash. + */ + com.google.protobuf.ByteString getNextProofContextHash(); + + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + java.util.List + getNetworkSectionToRootList(); + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + com.icon.types.v1.MerkleNode getNetworkSectionToRoot(int index); + /** + * repeated .icon.types.v1.MerkleNode network_section_to_root = 4 [json_name = "networkSectionToRoot"]; + */ + int getNetworkSectionToRootCount(); + + /** + * uint64 network_id = 5 [json_name = "networkId"]; + * @return The networkId. + */ + long getNetworkId(); + + /** + * uint64 update_number = 6 [json_name = "updateNumber"]; + * @return The updateNumber. + */ + long getUpdateNumber(); + + /** + * bytes prev_network_section_hash = 7 [json_name = "prevNetworkSectionHash"]; + * @return The prevNetworkSectionHash. + */ + com.google.protobuf.ByteString getPrevNetworkSectionHash(); + + /** + * uint64 message_count = 8 [json_name = "messageCount"]; + * @return The messageCount. + */ + long getMessageCount(); + + /** + * bytes message_root = 9 [json_name = "messageRoot"]; + * @return The messageRoot. + */ + com.google.protobuf.ByteString getMessageRoot(); + + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return A list containing the nextValidators. + */ + java.util.List getNextValidatorsList(); + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @return The count of nextValidators. + */ + int getNextValidatorsCount(); + /** + * repeated bytes nextValidators = 10 [json_name = "nextValidators"]; + * @param index The index of the element to return. + * @return The nextValidators at the given index. + */ + com.google.protobuf.ByteString getNextValidators(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BlockIDFlag.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BlockIDFlag.java new file mode 100644 index 000000000..cb54ccf9d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/BlockIDFlag.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + *
+ * BlockIdFlag indicates which BlcokID the signature is for
+ * 
+ * + * Protobuf enum {@code icon.types.v1.BlockIDFlag} + */ +public enum BlockIDFlag + implements com.google.protobuf.Internal.EnumLite { + /** + * BLOCK_ID_FLAG_UNKNOWN = 0; + */ + BLOCK_ID_FLAG_UNKNOWN(0), + /** + * BLOCK_ID_FLAG_ABSENT = 1; + */ + BLOCK_ID_FLAG_ABSENT(1), + /** + * BLOCK_ID_FLAG_COMMIT = 2; + */ + BLOCK_ID_FLAG_COMMIT(2), + /** + * BLOCK_ID_FLAG_NIL = 3; + */ + BLOCK_ID_FLAG_NIL(3), + UNRECOGNIZED(-1), + ; + + /** + * BLOCK_ID_FLAG_UNKNOWN = 0; + */ + public static final int BLOCK_ID_FLAG_UNKNOWN_VALUE = 0; + /** + * BLOCK_ID_FLAG_ABSENT = 1; + */ + public static final int BLOCK_ID_FLAG_ABSENT_VALUE = 1; + /** + * BLOCK_ID_FLAG_COMMIT = 2; + */ + public static final int BLOCK_ID_FLAG_COMMIT_VALUE = 2; + /** + * BLOCK_ID_FLAG_NIL = 3; + */ + public static final int BLOCK_ID_FLAG_NIL_VALUE = 3; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockIDFlag valueOf(int value) { + return forNumber(value); + } + + public static BlockIDFlag forNumber(int value) { + switch (value) { + case 0: return BLOCK_ID_FLAG_UNKNOWN; + case 1: return BLOCK_ID_FLAG_ABSENT; + case 2: return BLOCK_ID_FLAG_COMMIT; + case 3: return BLOCK_ID_FLAG_NIL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockIDFlag> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public BlockIDFlag findValueByNumber(int number) { + return BlockIDFlag.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return BlockIDFlagVerifier.INSTANCE; + } + + private static final class BlockIDFlagVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new BlockIDFlagVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return BlockIDFlag.forNumber(number) != null; + } + }; + + private final int value; + + private BlockIDFlag(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.types.v1.BlockIDFlag) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNode.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNode.java new file mode 100644 index 000000000..3044dbc0a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNode.java @@ -0,0 +1,296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + * Protobuf type {@code icon.types.v1.MerkleNode} + */ +public final class MerkleNode extends + com.google.protobuf.GeneratedMessageLite< + MerkleNode, MerkleNode.Builder> implements + // @@protoc_insertion_point(message_implements:icon.types.v1.MerkleNode) + MerkleNodeOrBuilder { + private MerkleNode() { + value_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int DIR_FIELD_NUMBER = 1; + private int dir_; + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @return The dir. + */ + @java.lang.Override + public int getDir() { + return dir_; + } + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @param value The dir to set. + */ + private void setDir(int value) { + + dir_ = value; + } + /** + * int32 Dir = 1 [json_name = "Dir"]; + */ + private void clearDir() { + + dir_ = 0; + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString value_; + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return value_; + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + */ + private void setValue(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + value_ = value; + } + /** + * bytes value = 2 [json_name = "value"]; + */ + private void clearValue() { + + value_ = getDefaultInstance().getValue(); + } + + public static com.icon.types.v1.MerkleNode parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleNode parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleNode parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleNode parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleNode parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleNode parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleNode parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleNode parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.MerkleNode parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleNode parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.MerkleNode parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleNode parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.types.v1.MerkleNode prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.types.v1.MerkleNode} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.types.v1.MerkleNode, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.types.v1.MerkleNode) + com.icon.types.v1.MerkleNodeOrBuilder { + // Construct using com.icon.types.v1.MerkleNode.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @return The dir. + */ + @java.lang.Override + public int getDir() { + return instance.getDir(); + } + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @param value The dir to set. + * @return This builder for chaining. + */ + public Builder setDir(int value) { + copyOnWrite(); + instance.setDir(value); + return this; + } + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @return This builder for chaining. + */ + public Builder clearDir() { + copyOnWrite(); + instance.clearDir(); + return this; + } + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValue() { + return instance.getValue(); + } + /** + * bytes value = 2 [json_name = "value"]; + * @param value The value to set. + * @return This builder for chaining. + */ + public Builder setValue(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValue(value); + return this; + } + /** + * bytes value = 2 [json_name = "value"]; + * @return This builder for chaining. + */ + public Builder clearValue() { + copyOnWrite(); + instance.clearValue(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.types.v1.MerkleNode) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.types.v1.MerkleNode(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "dir_", + "value_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0004\u0002\n" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.types.v1.MerkleNode.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.types.v1.MerkleNode) + private static final com.icon.types.v1.MerkleNode DEFAULT_INSTANCE; + static { + MerkleNode defaultInstance = new MerkleNode(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleNode.class, defaultInstance); + } + + public static com.icon.types.v1.MerkleNode getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNodeOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNodeOrBuilder.java new file mode 100644 index 000000000..55188f2ed --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleNodeOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +public interface MerkleNodeOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.types.v1.MerkleNode) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int32 Dir = 1 [json_name = "Dir"]; + * @return The dir. + */ + int getDir(); + + /** + * bytes value = 2 [json_name = "value"]; + * @return The value. + */ + com.google.protobuf.ByteString getValue(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofs.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofs.java new file mode 100644 index 000000000..28dddaf9b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofs.java @@ -0,0 +1,382 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + * Protobuf type {@code icon.types.v1.MerkleProofs} + */ +public final class MerkleProofs extends + com.google.protobuf.GeneratedMessageLite< + MerkleProofs, MerkleProofs.Builder> implements + // @@protoc_insertion_point(message_implements:icon.types.v1.MerkleProofs) + MerkleProofsOrBuilder { + private MerkleProofs() { + proofs_ = emptyProtobufList(); + } + public static final int PROOFS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList proofs_; + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return proofs_; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public java.util.List + getProofsOrBuilderList() { + return proofs_; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return proofs_.size(); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.icon.types.v1.MerkleNode getProofs(int index) { + return proofs_.get(index); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public com.icon.types.v1.MerkleNodeOrBuilder getProofsOrBuilder( + int index) { + return proofs_.get(index); + } + private void ensureProofsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = proofs_; + if (!tmp.isModifiable()) { + proofs_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void setProofs( + int index, com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.set(index, value); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void addProofs(com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(value); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void addProofs( + int index, com.icon.types.v1.MerkleNode value) { + value.getClass(); + ensureProofsIsMutable(); + proofs_.add(index, value); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void addAllProofs( + java.lang.Iterable values) { + ensureProofsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, proofs_); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void clearProofs() { + proofs_ = emptyProtobufList(); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + private void removeProofs(int index) { + ensureProofsIsMutable(); + proofs_.remove(index); + } + + public static com.icon.types.v1.MerkleProofs parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleProofs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.MerkleProofs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.MerkleProofs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleProofs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.MerkleProofs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.types.v1.MerkleProofs prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.types.v1.MerkleProofs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.types.v1.MerkleProofs, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.types.v1.MerkleProofs) + com.icon.types.v1.MerkleProofsOrBuilder { + // Construct using com.icon.types.v1.MerkleProofs.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public java.util.List getProofsList() { + return java.util.Collections.unmodifiableList( + instance.getProofsList()); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public int getProofsCount() { + return instance.getProofsCount(); + }/** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + @java.lang.Override + public com.icon.types.v1.MerkleNode getProofs(int index) { + return instance.getProofs(index); + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.setProofs(index, value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder setProofs( + int index, com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.setProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs(com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.addProofs(value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.icon.types.v1.MerkleNode value) { + copyOnWrite(); + instance.addProofs(index, value); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder addProofs( + int index, com.icon.types.v1.MerkleNode.Builder builderForValue) { + copyOnWrite(); + instance.addProofs(index, + builderForValue.build()); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder addAllProofs( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllProofs(values); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder clearProofs() { + copyOnWrite(); + instance.clearProofs(); + return this; + } + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + public Builder removeProofs(int index) { + copyOnWrite(); + instance.removeProofs(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.types.v1.MerkleProofs) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.types.v1.MerkleProofs(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "proofs_", + com.icon.types.v1.MerkleNode.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.types.v1.MerkleProofs.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.types.v1.MerkleProofs) + private static final com.icon.types.v1.MerkleProofs DEFAULT_INSTANCE; + static { + MerkleProofs defaultInstance = new MerkleProofs(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + MerkleProofs.class, defaultInstance); + } + + public static com.icon.types.v1.MerkleProofs getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofsOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofsOrBuilder.java new file mode 100644 index 000000000..8ecf8cae5 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/MerkleProofsOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +public interface MerkleProofsOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.types.v1.MerkleProofs) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + java.util.List + getProofsList(); + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + com.icon.types.v1.MerkleNode getProofs(int index); + /** + * repeated .icon.types.v1.MerkleNode proofs = 1 [json_name = "proofs"]; + */ + int getProofsCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeader.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeader.java new file mode 100644 index 000000000..0ff8b603f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeader.java @@ -0,0 +1,619 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + * Protobuf type {@code icon.types.v1.SignedHeader} + */ +public final class SignedHeader extends + com.google.protobuf.GeneratedMessageLite< + SignedHeader, SignedHeader.Builder> implements + // @@protoc_insertion_point(message_implements:icon.types.v1.SignedHeader) + SignedHeaderOrBuilder { + private SignedHeader() { + signatures_ = emptyProtobufList(); + currentValidators_ = emptyProtobufList(); + } + public static final int HEADER_FIELD_NUMBER = 1; + private com.icon.types.v1.BTPHeader header_; + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.icon.types.v1.BTPHeader getHeader() { + return header_ == null ? com.icon.types.v1.BTPHeader.getDefaultInstance() : header_; + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + private void setHeader(com.icon.types.v1.BTPHeader value) { + value.getClass(); + header_ = value; + + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader(com.icon.types.v1.BTPHeader value) { + value.getClass(); + if (header_ != null && + header_ != com.icon.types.v1.BTPHeader.getDefaultInstance()) { + header_ = + com.icon.types.v1.BTPHeader.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + private void clearHeader() { header_ = null; + + } + + public static final int SIGNATURES_FIELD_NUMBER = 2; + private com.google.protobuf.Internal.ProtobufList signatures_; + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return A list containing the signatures. + */ + @java.lang.Override + public java.util.List + getSignaturesList() { + return signatures_; + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return The count of signatures. + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignatures(int index) { + return signatures_.get(index); + } + private void ensureSignaturesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = signatures_; + if (!tmp.isModifiable()) { + signatures_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param index The index to set the value at. + * @param value The signatures to set. + */ + private void setSignatures( + int index, com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureSignaturesIsMutable(); + signatures_.set(index, value); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param value The signatures to add. + */ + private void addSignatures(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureSignaturesIsMutable(); + signatures_.add(value); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param values The signatures to add. + */ + private void addAllSignatures( + java.lang.Iterable values) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, signatures_); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + */ + private void clearSignatures() { + signatures_ = emptyProtobufList(); + } + + public static final int CURRENTVALIDATORS_FIELD_NUMBER = 3; + private com.google.protobuf.Internal.ProtobufList currentValidators_; + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return A list containing the currentValidators. + */ + @java.lang.Override + public java.util.List + getCurrentValidatorsList() { + return currentValidators_; + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return The count of currentValidators. + */ + @java.lang.Override + public int getCurrentValidatorsCount() { + return currentValidators_.size(); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param index The index of the element to return. + * @return The currentValidators at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentValidators(int index) { + return currentValidators_.get(index); + } + private void ensureCurrentValidatorsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = currentValidators_; + if (!tmp.isModifiable()) { + currentValidators_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param index The index to set the value at. + * @param value The currentValidators to set. + */ + private void setCurrentValidators( + int index, com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureCurrentValidatorsIsMutable(); + currentValidators_.set(index, value); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param value The currentValidators to add. + */ + private void addCurrentValidators(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureCurrentValidatorsIsMutable(); + currentValidators_.add(value); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param values The currentValidators to add. + */ + private void addAllCurrentValidators( + java.lang.Iterable values) { + ensureCurrentValidatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, currentValidators_); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + */ + private void clearCurrentValidators() { + currentValidators_ = emptyProtobufList(); + } + + public static final int TRUSTED_HEIGHT_FIELD_NUMBER = 4; + private long trustedHeight_; + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @return The trustedHeight. + */ + @java.lang.Override + public long getTrustedHeight() { + return trustedHeight_; + } + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @param value The trustedHeight to set. + */ + private void setTrustedHeight(long value) { + + trustedHeight_ = value; + } + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + */ + private void clearTrustedHeight() { + + trustedHeight_ = 0L; + } + + public static com.icon.types.v1.SignedHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.SignedHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.SignedHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.SignedHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.SignedHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.icon.types.v1.SignedHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.icon.types.v1.SignedHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.SignedHeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.SignedHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.SignedHeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.icon.types.v1.SignedHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.icon.types.v1.SignedHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.icon.types.v1.SignedHeader prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code icon.types.v1.SignedHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.icon.types.v1.SignedHeader, Builder> implements + // @@protoc_insertion_point(builder_implements:icon.types.v1.SignedHeader) + com.icon.types.v1.SignedHeaderOrBuilder { + // Construct using com.icon.types.v1.SignedHeader.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return instance.hasHeader(); + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.icon.types.v1.BTPHeader getHeader() { + return instance.getHeader(); + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + public Builder setHeader(com.icon.types.v1.BTPHeader value) { + copyOnWrite(); + instance.setHeader(value); + return this; + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + public Builder setHeader( + com.icon.types.v1.BTPHeader.Builder builderForValue) { + copyOnWrite(); + instance.setHeader(builderForValue.build()); + return this; + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + public Builder mergeHeader(com.icon.types.v1.BTPHeader value) { + copyOnWrite(); + instance.mergeHeader(value); + return this; + } + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + */ + public Builder clearHeader() { copyOnWrite(); + instance.clearHeader(); + return this; + } + + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return A list containing the signatures. + */ + @java.lang.Override + public java.util.List + getSignaturesList() { + return java.util.Collections.unmodifiableList( + instance.getSignaturesList()); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return The count of signatures. + */ + @java.lang.Override + public int getSignaturesCount() { + return instance.getSignaturesCount(); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignatures(int index) { + return instance.getSignatures(index); + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param value The signatures to set. + * @return This builder for chaining. + */ + public Builder setSignatures( + int index, com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSignatures(index, value); + return this; + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param value The signatures to add. + * @return This builder for chaining. + */ + public Builder addSignatures(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addSignatures(value); + return this; + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param values The signatures to add. + * @return This builder for chaining. + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllSignatures(values); + return this; + } + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return This builder for chaining. + */ + public Builder clearSignatures() { + copyOnWrite(); + instance.clearSignatures(); + return this; + } + + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return A list containing the currentValidators. + */ + @java.lang.Override + public java.util.List + getCurrentValidatorsList() { + return java.util.Collections.unmodifiableList( + instance.getCurrentValidatorsList()); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return The count of currentValidators. + */ + @java.lang.Override + public int getCurrentValidatorsCount() { + return instance.getCurrentValidatorsCount(); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param index The index of the element to return. + * @return The currentValidators at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCurrentValidators(int index) { + return instance.getCurrentValidators(index); + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param value The currentValidators to set. + * @return This builder for chaining. + */ + public Builder setCurrentValidators( + int index, com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setCurrentValidators(index, value); + return this; + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param value The currentValidators to add. + * @return This builder for chaining. + */ + public Builder addCurrentValidators(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addCurrentValidators(value); + return this; + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param values The currentValidators to add. + * @return This builder for chaining. + */ + public Builder addAllCurrentValidators( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllCurrentValidators(values); + return this; + } + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return This builder for chaining. + */ + public Builder clearCurrentValidators() { + copyOnWrite(); + instance.clearCurrentValidators(); + return this; + } + + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @return The trustedHeight. + */ + @java.lang.Override + public long getTrustedHeight() { + return instance.getTrustedHeight(); + } + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @param value The trustedHeight to set. + * @return This builder for chaining. + */ + public Builder setTrustedHeight(long value) { + copyOnWrite(); + instance.setTrustedHeight(value); + return this; + } + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @return This builder for chaining. + */ + public Builder clearTrustedHeight() { + copyOnWrite(); + instance.clearTrustedHeight(); + return this; + } + + // @@protoc_insertion_point(builder_scope:icon.types.v1.SignedHeader) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.icon.types.v1.SignedHeader(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "header_", + "signatures_", + "currentValidators_", + "trustedHeight_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0002\u0000\u0001\t\u0002\u001c" + + "\u0003\u001c\u0004\u0003"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.icon.types.v1.SignedHeader.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:icon.types.v1.SignedHeader) + private static final com.icon.types.v1.SignedHeader DEFAULT_INSTANCE; + static { + SignedHeader defaultInstance = new SignedHeader(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SignedHeader.class, defaultInstance); + } + + public static com.icon.types.v1.SignedHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeaderOrBuilder.java new file mode 100644 index 000000000..a8b8026f7 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedHeaderOrBuilder.java @@ -0,0 +1,60 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +public interface SignedHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:icon.types.v1.SignedHeader) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .icon.types.v1.BTPHeader header = 1 [json_name = "header"]; + * @return The header. + */ + com.icon.types.v1.BTPHeader getHeader(); + + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return A list containing the signatures. + */ + java.util.List getSignaturesList(); + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @return The count of signatures. + */ + int getSignaturesCount(); + /** + * repeated bytes signatures = 2 [json_name = "signatures"]; + * @param index The index of the element to return. + * @return The signatures at the given index. + */ + com.google.protobuf.ByteString getSignatures(int index); + + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return A list containing the currentValidators. + */ + java.util.List getCurrentValidatorsList(); + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @return The count of currentValidators. + */ + int getCurrentValidatorsCount(); + /** + * repeated bytes currentValidators = 3 [json_name = "currentValidators"]; + * @param index The index of the element to return. + * @return The currentValidators at the given index. + */ + com.google.protobuf.ByteString getCurrentValidators(int index); + + /** + * uint64 trusted_height = 4 [json_name = "trustedHeight"]; + * @return The trustedHeight. + */ + long getTrustedHeight(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedMsgType.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedMsgType.java new file mode 100644 index 000000000..ebaddc335 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/SignedMsgType.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +/** + *
+ * SignedMsgType is a type of signed message in the consensus.
+ * 
+ * + * Protobuf enum {@code icon.types.v1.SignedMsgType} + */ +public enum SignedMsgType + implements com.google.protobuf.Internal.EnumLite { + /** + * SIGNED_MSG_TYPE_UNKNOWN = 0; + */ + SIGNED_MSG_TYPE_UNKNOWN(0), + /** + *
+   * Votes
+   * 
+ * + * SIGNED_MSG_TYPE_PREVOTE = 1; + */ + SIGNED_MSG_TYPE_PREVOTE(1), + /** + * SIGNED_MSG_TYPE_PRECOMMIT = 2; + */ + SIGNED_MSG_TYPE_PRECOMMIT(2), + /** + *
+   * Proposals
+   * 
+ * + * SIGNED_MSG_TYPE_PROPOSAL = 32; + */ + SIGNED_MSG_TYPE_PROPOSAL(32), + UNRECOGNIZED(-1), + ; + + /** + * SIGNED_MSG_TYPE_UNKNOWN = 0; + */ + public static final int SIGNED_MSG_TYPE_UNKNOWN_VALUE = 0; + /** + *
+   * Votes
+   * 
+ * + * SIGNED_MSG_TYPE_PREVOTE = 1; + */ + public static final int SIGNED_MSG_TYPE_PREVOTE_VALUE = 1; + /** + * SIGNED_MSG_TYPE_PRECOMMIT = 2; + */ + public static final int SIGNED_MSG_TYPE_PRECOMMIT_VALUE = 2; + /** + *
+   * Proposals
+   * 
+ * + * SIGNED_MSG_TYPE_PROPOSAL = 32; + */ + public static final int SIGNED_MSG_TYPE_PROPOSAL_VALUE = 32; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SignedMsgType valueOf(int value) { + return forNumber(value); + } + + public static SignedMsgType forNumber(int value) { + switch (value) { + case 0: return SIGNED_MSG_TYPE_UNKNOWN; + case 1: return SIGNED_MSG_TYPE_PREVOTE; + case 2: return SIGNED_MSG_TYPE_PRECOMMIT; + case 32: return SIGNED_MSG_TYPE_PROPOSAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SignedMsgType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public SignedMsgType findValueByNumber(int number) { + return SignedMsgType.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return SignedMsgTypeVerifier.INSTANCE; + } + + private static final class SignedMsgTypeVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new SignedMsgTypeVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return SignedMsgType.forNumber(number) != null; + } + }; + + private final int value; + + private SignedMsgType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:icon.types.v1.SignedMsgType) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/TypesProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/TypesProto.java new file mode 100644 index 000000000..2f545ac67 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/icon/types/v1/TypesProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: icon/types/v1/types.proto + +package com.icon.types.v1; + +public final class TypesProto { + private TypesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOp.java new file mode 100644 index 000000000..6b8a9febf --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOp.java @@ -0,0 +1,478 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +/** + * Protobuf type {@code tendermint.crypto.DominoOp} + */ +public final class DominoOp extends + com.google.protobuf.GeneratedMessageLite< + DominoOp, DominoOp.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.DominoOp) + DominoOpOrBuilder { + private DominoOp() { + key_ = ""; + input_ = ""; + output_ = ""; + } + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.String key_; + /** + * string key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + return key_; + } + /** + * string key = 1 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(key_); + } + /** + * string key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * string key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + /** + * string key = 1 [json_name = "key"]; + * @param value The bytes for key to set. + */ + private void setKeyBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + key_ = value.toStringUtf8(); + + } + + public static final int INPUT_FIELD_NUMBER = 2; + private java.lang.String input_; + /** + * string input = 2 [json_name = "input"]; + * @return The input. + */ + @java.lang.Override + public java.lang.String getInput() { + return input_; + } + /** + * string input = 2 [json_name = "input"]; + * @return The bytes for input. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInputBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(input_); + } + /** + * string input = 2 [json_name = "input"]; + * @param value The input to set. + */ + private void setInput( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + input_ = value; + } + /** + * string input = 2 [json_name = "input"]; + */ + private void clearInput() { + + input_ = getDefaultInstance().getInput(); + } + /** + * string input = 2 [json_name = "input"]; + * @param value The bytes for input to set. + */ + private void setInputBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + input_ = value.toStringUtf8(); + + } + + public static final int OUTPUT_FIELD_NUMBER = 3; + private java.lang.String output_; + /** + * string output = 3 [json_name = "output"]; + * @return The output. + */ + @java.lang.Override + public java.lang.String getOutput() { + return output_; + } + /** + * string output = 3 [json_name = "output"]; + * @return The bytes for output. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOutputBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(output_); + } + /** + * string output = 3 [json_name = "output"]; + * @param value The output to set. + */ + private void setOutput( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + output_ = value; + } + /** + * string output = 3 [json_name = "output"]; + */ + private void clearOutput() { + + output_ = getDefaultInstance().getOutput(); + } + /** + * string output = 3 [json_name = "output"]; + * @param value The bytes for output to set. + */ + private void setOutputBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + output_ = value.toStringUtf8(); + + } + + public static com.tendermint.crypto.DominoOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.DominoOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.DominoOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.DominoOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.DominoOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.DominoOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.DominoOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.DominoOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.DominoOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.DominoOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.DominoOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.DominoOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.DominoOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.crypto.DominoOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.DominoOp, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.DominoOp) + com.tendermint.crypto.DominoOpOrBuilder { + // Construct using com.tendermint.crypto.DominoOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public java.lang.String getKey() { + return instance.getKey(); + } + /** + * string key = 1 [json_name = "key"]; + * @return The bytes for key. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getKeyBytes() { + return instance.getKeyBytes(); + } + /** + * string key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey( + java.lang.String value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * string key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + /** + * string key = 1 [json_name = "key"]; + * @param value The bytes for key to set. + * @return This builder for chaining. + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKeyBytes(value); + return this; + } + + /** + * string input = 2 [json_name = "input"]; + * @return The input. + */ + @java.lang.Override + public java.lang.String getInput() { + return instance.getInput(); + } + /** + * string input = 2 [json_name = "input"]; + * @return The bytes for input. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getInputBytes() { + return instance.getInputBytes(); + } + /** + * string input = 2 [json_name = "input"]; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput( + java.lang.String value) { + copyOnWrite(); + instance.setInput(value); + return this; + } + /** + * string input = 2 [json_name = "input"]; + * @return This builder for chaining. + */ + public Builder clearInput() { + copyOnWrite(); + instance.clearInput(); + return this; + } + /** + * string input = 2 [json_name = "input"]; + * @param value The bytes for input to set. + * @return This builder for chaining. + */ + public Builder setInputBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setInputBytes(value); + return this; + } + + /** + * string output = 3 [json_name = "output"]; + * @return The output. + */ + @java.lang.Override + public java.lang.String getOutput() { + return instance.getOutput(); + } + /** + * string output = 3 [json_name = "output"]; + * @return The bytes for output. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getOutputBytes() { + return instance.getOutputBytes(); + } + /** + * string output = 3 [json_name = "output"]; + * @param value The output to set. + * @return This builder for chaining. + */ + public Builder setOutput( + java.lang.String value) { + copyOnWrite(); + instance.setOutput(value); + return this; + } + /** + * string output = 3 [json_name = "output"]; + * @return This builder for chaining. + */ + public Builder clearOutput() { + copyOnWrite(); + instance.clearOutput(); + return this; + } + /** + * string output = 3 [json_name = "output"]; + * @param value The bytes for output to set. + * @return This builder for chaining. + */ + public Builder setOutputBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setOutputBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.DominoOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.DominoOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "input_", + "output_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\u0208" + + "\u0003\u0208"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.DominoOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.DominoOp) + private static final com.tendermint.crypto.DominoOp DEFAULT_INSTANCE; + static { + DominoOp defaultInstance = new DominoOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + DominoOp.class, defaultInstance); + } + + public static com.tendermint.crypto.DominoOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOpOrBuilder.java new file mode 100644 index 000000000..86852dd1b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/DominoOpOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public interface DominoOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.DominoOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string key = 1 [json_name = "key"]; + * @return The key. + */ + java.lang.String getKey(); + /** + * string key = 1 [json_name = "key"]; + * @return The bytes for key. + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * string input = 2 [json_name = "input"]; + * @return The input. + */ + java.lang.String getInput(); + /** + * string input = 2 [json_name = "input"]; + * @return The bytes for input. + */ + com.google.protobuf.ByteString + getInputBytes(); + + /** + * string output = 3 [json_name = "output"]; + * @return The output. + */ + java.lang.String getOutput(); + /** + * string output = 3 [json_name = "output"]; + * @return The bytes for output. + */ + com.google.protobuf.ByteString + getOutputBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/KeysProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/KeysProto.java new file mode 100644 index 000000000..0b5c27e0c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/KeysProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/keys.proto + +package com.tendermint.crypto; + +public final class KeysProto { + private KeysProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/Proof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/Proof.java new file mode 100644 index 000000000..e9ead93eb --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/Proof.java @@ -0,0 +1,494 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +/** + * Protobuf type {@code tendermint.crypto.Proof} + */ +public final class Proof extends + com.google.protobuf.GeneratedMessageLite< + Proof, Proof.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.Proof) + ProofOrBuilder { + private Proof() { + leafHash_ = com.google.protobuf.ByteString.EMPTY; + aunts_ = emptyProtobufList(); + } + public static final int TOTAL_FIELD_NUMBER = 1; + private long total_; + /** + * int64 total = 1 [json_name = "total"]; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return total_; + } + /** + * int64 total = 1 [json_name = "total"]; + * @param value The total to set. + */ + private void setTotal(long value) { + + total_ = value; + } + /** + * int64 total = 1 [json_name = "total"]; + */ + private void clearTotal() { + + total_ = 0L; + } + + public static final int INDEX_FIELD_NUMBER = 2; + private long index_; + /** + * int64 index = 2 [json_name = "index"]; + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return index_; + } + /** + * int64 index = 2 [json_name = "index"]; + * @param value The index to set. + */ + private void setIndex(long value) { + + index_ = value; + } + /** + * int64 index = 2 [json_name = "index"]; + */ + private void clearIndex() { + + index_ = 0L; + } + + public static final int LEAF_HASH_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString leafHash_; + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @return The leafHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLeafHash() { + return leafHash_; + } + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @param value The leafHash to set. + */ + private void setLeafHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + leafHash_ = value; + } + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + */ + private void clearLeafHash() { + + leafHash_ = getDefaultInstance().getLeafHash(); + } + + public static final int AUNTS_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList aunts_; + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return A list containing the aunts. + */ + @java.lang.Override + public java.util.List + getAuntsList() { + return aunts_; + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return The count of aunts. + */ + @java.lang.Override + public int getAuntsCount() { + return aunts_.size(); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param index The index of the element to return. + * @return The aunts at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAunts(int index) { + return aunts_.get(index); + } + private void ensureAuntsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = aunts_; + if (!tmp.isModifiable()) { + aunts_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param index The index to set the value at. + * @param value The aunts to set. + */ + private void setAunts( + int index, com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureAuntsIsMutable(); + aunts_.set(index, value); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param value The aunts to add. + */ + private void addAunts(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureAuntsIsMutable(); + aunts_.add(value); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param values The aunts to add. + */ + private void addAllAunts( + java.lang.Iterable values) { + ensureAuntsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, aunts_); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + */ + private void clearAunts() { + aunts_ = emptyProtobufList(); + } + + public static com.tendermint.crypto.Proof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.Proof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.Proof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.Proof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.Proof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.Proof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.Proof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.Proof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.Proof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.Proof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.Proof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.Proof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.Proof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.crypto.Proof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.Proof, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.Proof) + com.tendermint.crypto.ProofOrBuilder { + // Construct using com.tendermint.crypto.Proof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 total = 1 [json_name = "total"]; + * @return The total. + */ + @java.lang.Override + public long getTotal() { + return instance.getTotal(); + } + /** + * int64 total = 1 [json_name = "total"]; + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(long value) { + copyOnWrite(); + instance.setTotal(value); + return this; + } + /** + * int64 total = 1 [json_name = "total"]; + * @return This builder for chaining. + */ + public Builder clearTotal() { + copyOnWrite(); + instance.clearTotal(); + return this; + } + + /** + * int64 index = 2 [json_name = "index"]; + * @return The index. + */ + @java.lang.Override + public long getIndex() { + return instance.getIndex(); + } + /** + * int64 index = 2 [json_name = "index"]; + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(long value) { + copyOnWrite(); + instance.setIndex(value); + return this; + } + /** + * int64 index = 2 [json_name = "index"]; + * @return This builder for chaining. + */ + public Builder clearIndex() { + copyOnWrite(); + instance.clearIndex(); + return this; + } + + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @return The leafHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLeafHash() { + return instance.getLeafHash(); + } + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @param value The leafHash to set. + * @return This builder for chaining. + */ + public Builder setLeafHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setLeafHash(value); + return this; + } + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @return This builder for chaining. + */ + public Builder clearLeafHash() { + copyOnWrite(); + instance.clearLeafHash(); + return this; + } + + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return A list containing the aunts. + */ + @java.lang.Override + public java.util.List + getAuntsList() { + return java.util.Collections.unmodifiableList( + instance.getAuntsList()); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return The count of aunts. + */ + @java.lang.Override + public int getAuntsCount() { + return instance.getAuntsCount(); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param index The index of the element to return. + * @return The aunts at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAunts(int index) { + return instance.getAunts(index); + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param value The aunts to set. + * @return This builder for chaining. + */ + public Builder setAunts( + int index, com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setAunts(index, value); + return this; + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param value The aunts to add. + * @return This builder for chaining. + */ + public Builder addAunts(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addAunts(value); + return this; + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param values The aunts to add. + * @return This builder for chaining. + */ + public Builder addAllAunts( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllAunts(values); + return this; + } + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return This builder for chaining. + */ + public Builder clearAunts() { + copyOnWrite(); + instance.clearAunts(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.Proof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.Proof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "total_", + "index_", + "leafHash_", + "aunts_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\u0002\u0002\u0002" + + "\u0003\n\u0004\u001c"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.Proof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.Proof) + private static final com.tendermint.crypto.Proof DEFAULT_INSTANCE; + static { + Proof defaultInstance = new Proof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Proof.class, defaultInstance); + } + + public static com.tendermint.crypto.Proof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOp.java new file mode 100644 index 000000000..193bd98c4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOp.java @@ -0,0 +1,408 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +/** + *
+ * ProofOp defines an operation used for calculating Merkle root
+ * The data could be arbitrary format, providing nessecary data
+ * for example neighbouring node hash
+ * 
+ * + * Protobuf type {@code tendermint.crypto.ProofOp} + */ +public final class ProofOp extends + com.google.protobuf.GeneratedMessageLite< + ProofOp, ProofOp.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.ProofOp) + ProofOpOrBuilder { + private ProofOp() { + type_ = ""; + key_ = com.google.protobuf.ByteString.EMPTY; + data_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int TYPE_FIELD_NUMBER = 1; + private java.lang.String type_; + /** + * string type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + return type_; + } + /** + * string type = 1 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(type_); + } + /** + * string type = 1 [json_name = "type"]; + * @param value The type to set. + */ + private void setType( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + type_ = value; + } + /** + * string type = 1 [json_name = "type"]; + */ + private void clearType() { + + type_ = getDefaultInstance().getType(); + } + /** + * string type = 1 [json_name = "type"]; + * @param value The bytes for type to set. + */ + private void setTypeBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + type_ = value.toStringUtf8(); + + } + + public static final int KEY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString key_; + /** + * bytes key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + * bytes key = 2 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + * bytes key = 2 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int DATA_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString data_; + /** + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * bytes data = 3 [json_name = "data"]; + * @param value The data to set. + */ + private void setData(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + data_ = value; + } + /** + * bytes data = 3 [json_name = "data"]; + */ + private void clearData() { + + data_ = getDefaultInstance().getData(); + } + + public static com.tendermint.crypto.ProofOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ProofOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ProofOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.ProofOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ProofOp defines an operation used for calculating Merkle root
+   * The data could be arbitrary format, providing nessecary data
+   * for example neighbouring node hash
+   * 
+ * + * Protobuf type {@code tendermint.crypto.ProofOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.ProofOp, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.ProofOp) + com.tendermint.crypto.ProofOpOrBuilder { + // Construct using com.tendermint.crypto.ProofOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * string type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + return instance.getType(); + } + /** + * string type = 1 [json_name = "type"]; + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTypeBytes() { + return instance.getTypeBytes(); + } + /** + * string type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + java.lang.String value) { + copyOnWrite(); + instance.setType(value); + return this; + } + /** + * string type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + copyOnWrite(); + instance.clearType(); + return this; + } + /** + * string type = 1 [json_name = "type"]; + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTypeBytes(value); + return this; + } + + /** + * bytes key = 2 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + * bytes key = 2 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + * bytes key = 2 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return instance.getData(); + } + /** + * bytes data = 3 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setData(value); + return this; + } + /** + * bytes data = 3 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + copyOnWrite(); + instance.clearData(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.ProofOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.ProofOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "type_", + "key_", + "data_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u0208\u0002\n" + + "\u0003\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.ProofOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.ProofOp) + private static final com.tendermint.crypto.ProofOp DEFAULT_INSTANCE; + static { + ProofOp defaultInstance = new ProofOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ProofOp.class, defaultInstance); + } + + public static com.tendermint.crypto.ProofOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpOrBuilder.java new file mode 100644 index 000000000..a7368ebdd --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public interface ProofOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.ProofOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * string type = 1 [json_name = "type"]; + * @return The type. + */ + java.lang.String getType(); + /** + * string type = 1 [json_name = "type"]; + * @return The bytes for type. + */ + com.google.protobuf.ByteString + getTypeBytes(); + + /** + * bytes key = 2 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + * bytes data = 3 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOps.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOps.java new file mode 100644 index 000000000..0cbeb28d0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOps.java @@ -0,0 +1,390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +/** + *
+ * ProofOps is Merkle proof defined by the list of ProofOps
+ * 
+ * + * Protobuf type {@code tendermint.crypto.ProofOps} + */ +public final class ProofOps extends + com.google.protobuf.GeneratedMessageLite< + ProofOps, ProofOps.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.ProofOps) + ProofOpsOrBuilder { + private ProofOps() { + ops_ = emptyProtobufList(); + } + public static final int OPS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList ops_; + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getOpsList() { + return ops_; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public java.util.List + getOpsOrBuilderList() { + return ops_; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getOpsCount() { + return ops_.size(); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.ProofOp getOps(int index) { + return ops_.get(index); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public com.tendermint.crypto.ProofOpOrBuilder getOpsOrBuilder( + int index) { + return ops_.get(index); + } + private void ensureOpsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = ops_; + if (!tmp.isModifiable()) { + ops_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void setOps( + int index, com.tendermint.crypto.ProofOp value) { + value.getClass(); + ensureOpsIsMutable(); + ops_.set(index, value); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void addOps(com.tendermint.crypto.ProofOp value) { + value.getClass(); + ensureOpsIsMutable(); + ops_.add(value); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void addOps( + int index, com.tendermint.crypto.ProofOp value) { + value.getClass(); + ensureOpsIsMutable(); + ops_.add(index, value); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void addAllOps( + java.lang.Iterable values) { + ensureOpsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, ops_); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void clearOps() { + ops_ = emptyProtobufList(); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + private void removeOps(int index) { + ensureOpsIsMutable(); + ops_.remove(index); + } + + public static com.tendermint.crypto.ProofOps parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOps parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOps parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOps parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOps parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ProofOps parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ProofOps parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOps parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ProofOps parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOps parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ProofOps parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ProofOps parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.ProofOps prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * ProofOps is Merkle proof defined by the list of ProofOps
+   * 
+ * + * Protobuf type {@code tendermint.crypto.ProofOps} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.ProofOps, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.ProofOps) + com.tendermint.crypto.ProofOpsOrBuilder { + // Construct using com.tendermint.crypto.ProofOps.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getOpsList() { + return java.util.Collections.unmodifiableList( + instance.getOpsList()); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getOpsCount() { + return instance.getOpsCount(); + }/** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.ProofOp getOps(int index) { + return instance.getOps(index); + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder setOps( + int index, com.tendermint.crypto.ProofOp value) { + copyOnWrite(); + instance.setOps(index, value); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder setOps( + int index, com.tendermint.crypto.ProofOp.Builder builderForValue) { + copyOnWrite(); + instance.setOps(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder addOps(com.tendermint.crypto.ProofOp value) { + copyOnWrite(); + instance.addOps(value); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder addOps( + int index, com.tendermint.crypto.ProofOp value) { + copyOnWrite(); + instance.addOps(index, value); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder addOps( + com.tendermint.crypto.ProofOp.Builder builderForValue) { + copyOnWrite(); + instance.addOps(builderForValue.build()); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder addOps( + int index, com.tendermint.crypto.ProofOp.Builder builderForValue) { + copyOnWrite(); + instance.addOps(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder addAllOps( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllOps(values); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder clearOps() { + copyOnWrite(); + instance.clearOps(); + return this; + } + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + public Builder removeOps(int index) { + copyOnWrite(); + instance.removeOps(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.ProofOps) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.ProofOps(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "ops_", + com.tendermint.crypto.ProofOp.class, + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.ProofOps.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.ProofOps) + private static final com.tendermint.crypto.ProofOps DEFAULT_INSTANCE; + static { + ProofOps defaultInstance = new ProofOps(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ProofOps.class, defaultInstance); + } + + public static com.tendermint.crypto.ProofOps getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpsOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpsOrBuilder.java new file mode 100644 index 000000000..a0662c85b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOpsOrBuilder.java @@ -0,0 +1,23 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public interface ProofOpsOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.ProofOps) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + java.util.List + getOpsList(); + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + com.tendermint.crypto.ProofOp getOps(int index); + /** + * repeated .tendermint.crypto.ProofOp ops = 1 [json_name = "ops", (.gogoproto.nullable) = false]; + */ + int getOpsCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOrBuilder.java new file mode 100644 index 000000000..8f3047b32 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public interface ProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.Proof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 total = 1 [json_name = "total"]; + * @return The total. + */ + long getTotal(); + + /** + * int64 index = 2 [json_name = "index"]; + * @return The index. + */ + long getIndex(); + + /** + * bytes leaf_hash = 3 [json_name = "leafHash"]; + * @return The leafHash. + */ + com.google.protobuf.ByteString getLeafHash(); + + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return A list containing the aunts. + */ + java.util.List getAuntsList(); + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @return The count of aunts. + */ + int getAuntsCount(); + /** + * repeated bytes aunts = 4 [json_name = "aunts"]; + * @param index The index of the element to return. + * @return The aunts at the given index. + */ + com.google.protobuf.ByteString getAunts(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofProto.java new file mode 100644 index 000000000..45cc0043e --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ProofProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public final class ProofProto { + private ProofProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKey.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKey.java new file mode 100644 index 000000000..596f9b650 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKey.java @@ -0,0 +1,399 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/keys.proto + +package com.tendermint.crypto; + +/** + *
+ * PublicKey defines the keys available for use with Validators
+ * 
+ * + * Protobuf type {@code tendermint.crypto.PublicKey} + */ +public final class PublicKey extends + com.google.protobuf.GeneratedMessageLite< + PublicKey, PublicKey.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.PublicKey) + PublicKeyOrBuilder { + private PublicKey() { + } + private int sumCase_ = 0; + private java.lang.Object sum_; + public enum SumCase { + ED25519(1), + SECP256K1(2), + SUM_NOT_SET(0); + private final int value; + private SumCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SumCase valueOf(int value) { + return forNumber(value); + } + + public static SumCase forNumber(int value) { + switch (value) { + case 1: return ED25519; + case 2: return SECP256K1; + case 0: return SUM_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + @java.lang.Override + public SumCase + getSumCase() { + return SumCase.forNumber( + sumCase_); + } + + private void clearSum() { + sumCase_ = 0; + sum_ = null; + } + + public static final int ED25519_FIELD_NUMBER = 1; + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return Whether the ed25519 field is set. + */ + @java.lang.Override + public boolean hasEd25519() { + return sumCase_ == 1; + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return The ed25519. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEd25519() { + if (sumCase_ == 1) { + return (com.google.protobuf.ByteString) sum_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @param value The ed25519 to set. + */ + private void setEd25519(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + sumCase_ = 1; + sum_ = value; + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + */ + private void clearEd25519() { + if (sumCase_ == 1) { + sumCase_ = 0; + sum_ = null; + } + } + + public static final int SECP256K1_FIELD_NUMBER = 2; + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return Whether the secp256k1 field is set. + */ + @java.lang.Override + public boolean hasSecp256K1() { + return sumCase_ == 2; + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return The secp256k1. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecp256K1() { + if (sumCase_ == 2) { + return (com.google.protobuf.ByteString) sum_; + } + return com.google.protobuf.ByteString.EMPTY; + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @param value The secp256k1 to set. + */ + private void setSecp256K1(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + sumCase_ = 2; + sum_ = value; + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + */ + private void clearSecp256K1() { + if (sumCase_ == 2) { + sumCase_ = 0; + sum_ = null; + } + } + + public static com.tendermint.crypto.PublicKey parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.PublicKey parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.PublicKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.PublicKey parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.PublicKey parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.PublicKey parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.PublicKey parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.PublicKey parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.PublicKey parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.PublicKey parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.PublicKey parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.PublicKey prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * PublicKey defines the keys available for use with Validators
+   * 
+ * + * Protobuf type {@code tendermint.crypto.PublicKey} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.PublicKey, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.PublicKey) + com.tendermint.crypto.PublicKeyOrBuilder { + // Construct using com.tendermint.crypto.PublicKey.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + @java.lang.Override + public SumCase + getSumCase() { + return instance.getSumCase(); + } + + public Builder clearSum() { + copyOnWrite(); + instance.clearSum(); + return this; + } + + + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return Whether the ed25519 field is set. + */ + @java.lang.Override + public boolean hasEd25519() { + return instance.hasEd25519(); + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return The ed25519. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEd25519() { + return instance.getEd25519(); + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @param value The ed25519 to set. + * @return This builder for chaining. + */ + public Builder setEd25519(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setEd25519(value); + return this; + } + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return This builder for chaining. + */ + public Builder clearEd25519() { + copyOnWrite(); + instance.clearEd25519(); + return this; + } + + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return Whether the secp256k1 field is set. + */ + @java.lang.Override + public boolean hasSecp256K1() { + return instance.hasSecp256K1(); + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return The secp256k1. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecp256K1() { + return instance.getSecp256K1(); + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @param value The secp256k1 to set. + * @return This builder for chaining. + */ + public Builder setSecp256K1(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSecp256K1(value); + return this; + } + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return This builder for chaining. + */ + public Builder clearSecp256K1() { + copyOnWrite(); + instance.clearSecp256K1(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.PublicKey) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.PublicKey(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "sum_", + "sumCase_", + }; + java.lang.String info = + "\u0000\u0002\u0001\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001=\u0000\u0002=" + + "\u0000"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.PublicKey.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.PublicKey) + private static final com.tendermint.crypto.PublicKey DEFAULT_INSTANCE; + static { + PublicKey defaultInstance = new PublicKey(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + PublicKey.class, defaultInstance); + } + + public static com.tendermint.crypto.PublicKey getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKeyOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKeyOrBuilder.java new file mode 100644 index 000000000..0a9c932da --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/PublicKeyOrBuilder.java @@ -0,0 +1,33 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/keys.proto + +package com.tendermint.crypto; + +public interface PublicKeyOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.PublicKey) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return Whether the ed25519 field is set. + */ + boolean hasEd25519(); + /** + * bytes ed25519 = 1 [json_name = "ed25519"]; + * @return The ed25519. + */ + com.google.protobuf.ByteString getEd25519(); + + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return Whether the secp256k1 field is set. + */ + boolean hasSecp256K1(); + /** + * bytes secp256k1 = 2 [json_name = "secp256k1"]; + * @return The secp256k1. + */ + com.google.protobuf.ByteString getSecp256K1(); + + public com.tendermint.crypto.PublicKey.SumCase getSumCase(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOp.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOp.java new file mode 100644 index 000000000..fe5189e99 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOp.java @@ -0,0 +1,402 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +/** + * Protobuf type {@code tendermint.crypto.ValueOp} + */ +public final class ValueOp extends + com.google.protobuf.GeneratedMessageLite< + ValueOp, ValueOp.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.crypto.ValueOp) + ValueOpOrBuilder { + private ValueOp() { + key_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int KEY_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString key_; + /** + *
+   * Encoded in ProofOp.Key.
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return key_; + } + /** + *
+   * Encoded in ProofOp.Key.
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + */ + private void setKey(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + key_ = value; + } + /** + *
+   * Encoded in ProofOp.Key.
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + */ + private void clearKey() { + + key_ = getDefaultInstance().getKey(); + } + + public static final int PROOF_FIELD_NUMBER = 2; + private com.tendermint.crypto.Proof proof_; + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + @java.lang.Override + public boolean hasProof() { + return proof_ != null; + } + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return proof_ == null ? com.tendermint.crypto.Proof.getDefaultInstance() : proof_; + } + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + private void setProof(com.tendermint.crypto.Proof value) { + value.getClass(); + proof_ = value; + + } + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeProof(com.tendermint.crypto.Proof value) { + value.getClass(); + if (proof_ != null && + proof_ != com.tendermint.crypto.Proof.getDefaultInstance()) { + proof_ = + com.tendermint.crypto.Proof.newBuilder(proof_).mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + + } + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + private void clearProof() { proof_ = null; + + } + + public static com.tendermint.crypto.ValueOp parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ValueOp parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ValueOp parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ValueOp parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ValueOp parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.crypto.ValueOp parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.crypto.ValueOp parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ValueOp parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ValueOp parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ValueOp parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.crypto.ValueOp parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.crypto.ValueOp parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.crypto.ValueOp prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.crypto.ValueOp} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.crypto.ValueOp, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.crypto.ValueOp) + com.tendermint.crypto.ValueOpOrBuilder { + // Construct using com.tendermint.crypto.ValueOp.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * Encoded in ProofOp.Key.
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + @java.lang.Override + public com.google.protobuf.ByteString getKey() { + return instance.getKey(); + } + /** + *
+     * Encoded in ProofOp.Key.
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @param value The key to set. + * @return This builder for chaining. + */ + public Builder setKey(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setKey(value); + return this; + } + /** + *
+     * Encoded in ProofOp.Key.
+     * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return This builder for chaining. + */ + public Builder clearKey() { + copyOnWrite(); + instance.clearKey(); + return this; + } + + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + @java.lang.Override + public boolean hasProof() { + return instance.hasProof(); + } + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return instance.getProof(); + } + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + public Builder setProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.setProof(value); + return this; + } + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + public Builder setProof( + com.tendermint.crypto.Proof.Builder builderForValue) { + copyOnWrite(); + instance.setProof(builderForValue.build()); + return this; + } + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + public Builder mergeProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.mergeProof(value); + return this; + } + /** + *
+     * To encode in ProofOp.Data
+     * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + */ + public Builder clearProof() { copyOnWrite(); + instance.clearProof(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.crypto.ValueOp) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.crypto.ValueOp(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "key_", + "proof_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\n\u0002\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.crypto.ValueOp.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.crypto.ValueOp) + private static final com.tendermint.crypto.ValueOp DEFAULT_INSTANCE; + static { + ValueOp defaultInstance = new ValueOp(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ValueOp.class, defaultInstance); + } + + public static com.tendermint.crypto.ValueOp getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOpOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOpOrBuilder.java new file mode 100644 index 000000000..0a4f7d58c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/crypto/ValueOpOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/crypto/proof.proto + +package com.tendermint.crypto; + +public interface ValueOpOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.crypto.ValueOp) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * Encoded in ProofOp.Key.
+   * 
+ * + * bytes key = 1 [json_name = "key"]; + * @return The key. + */ + com.google.protobuf.ByteString getKey(); + + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + * @return Whether the proof field is set. + */ + boolean hasProof(); + /** + *
+   * To encode in ProofOp.Data
+   * 
+ * + * .tendermint.crypto.Proof proof = 2 [json_name = "proof"]; + * @return The proof. + */ + com.tendermint.crypto.Proof getProof(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockID.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockID.java new file mode 100644 index 000000000..91fd350f8 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockID.java @@ -0,0 +1,342 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * BlockID
+ * 
+ * + * Protobuf type {@code tendermint.types.BlockID} + */ +public final class BlockID extends + com.google.protobuf.GeneratedMessageLite< + BlockID, BlockID.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.BlockID) + BlockIDOrBuilder { + private BlockID() { + hash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int HASH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString hash_; + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return hash_; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + hash_ = value; + } + /** + * bytes hash = 1 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = getDefaultInstance().getHash(); + } + + public static final int PART_SET_HEADER_FIELD_NUMBER = 2; + private com.tendermint.types.PartSetHeader partSetHeader_; + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPartSetHeader() { + return partSetHeader_ != null; + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.PartSetHeader getPartSetHeader() { + return partSetHeader_ == null ? com.tendermint.types.PartSetHeader.getDefaultInstance() : partSetHeader_; + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + private void setPartSetHeader(com.tendermint.types.PartSetHeader value) { + value.getClass(); + partSetHeader_ = value; + + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePartSetHeader(com.tendermint.types.PartSetHeader value) { + value.getClass(); + if (partSetHeader_ != null && + partSetHeader_ != com.tendermint.types.PartSetHeader.getDefaultInstance()) { + partSetHeader_ = + com.tendermint.types.PartSetHeader.newBuilder(partSetHeader_).mergeFrom(value).buildPartial(); + } else { + partSetHeader_ = value; + } + + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + private void clearPartSetHeader() { partSetHeader_ = null; + + } + + public static com.tendermint.types.BlockID parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockID parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockID parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockID parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockID parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockID parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockID parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockID parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.BlockID parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockID parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.BlockID parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockID parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.BlockID prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * BlockID
+   * 
+ * + * Protobuf type {@code tendermint.types.BlockID} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.BlockID, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.BlockID) + com.tendermint.types.BlockIDOrBuilder { + // Construct using com.tendermint.types.BlockID.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return instance.getHash(); + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * bytes hash = 1 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPartSetHeader() { + return instance.hasPartSetHeader(); + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.PartSetHeader getPartSetHeader() { + return instance.getPartSetHeader(); + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + public Builder setPartSetHeader(com.tendermint.types.PartSetHeader value) { + copyOnWrite(); + instance.setPartSetHeader(value); + return this; + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + public Builder setPartSetHeader( + com.tendermint.types.PartSetHeader.Builder builderForValue) { + copyOnWrite(); + instance.setPartSetHeader(builderForValue.build()); + return this; + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + public Builder mergePartSetHeader(com.tendermint.types.PartSetHeader value) { + copyOnWrite(); + instance.mergePartSetHeader(value); + return this; + } + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + */ + public Builder clearPartSetHeader() { copyOnWrite(); + instance.clearPartSetHeader(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.BlockID) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.BlockID(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "hash_", + "partSetHeader_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\n\u0002\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.BlockID.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.BlockID) + private static final com.tendermint.types.BlockID DEFAULT_INSTANCE; + static { + BlockID defaultInstance = new BlockID(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BlockID.class, defaultInstance); + } + + public static com.tendermint.types.BlockID getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDFlag.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDFlag.java new file mode 100644 index 000000000..0b61aed9b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDFlag.java @@ -0,0 +1,116 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * BlockIdFlag indicates which BlcokID the signature is for
+ * 
+ * + * Protobuf enum {@code tendermint.types.BlockIDFlag} + */ +public enum BlockIDFlag + implements com.google.protobuf.Internal.EnumLite { + /** + * BLOCK_ID_FLAG_UNKNOWN = 0 [(.gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; + */ + BLOCK_ID_FLAG_UNKNOWN(0), + /** + * BLOCK_ID_FLAG_ABSENT = 1 [(.gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; + */ + BLOCK_ID_FLAG_ABSENT(1), + /** + * BLOCK_ID_FLAG_COMMIT = 2 [(.gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; + */ + BLOCK_ID_FLAG_COMMIT(2), + /** + * BLOCK_ID_FLAG_NIL = 3 [(.gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; + */ + BLOCK_ID_FLAG_NIL(3), + UNRECOGNIZED(-1), + ; + + /** + * BLOCK_ID_FLAG_UNKNOWN = 0 [(.gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; + */ + public static final int BLOCK_ID_FLAG_UNKNOWN_VALUE = 0; + /** + * BLOCK_ID_FLAG_ABSENT = 1 [(.gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; + */ + public static final int BLOCK_ID_FLAG_ABSENT_VALUE = 1; + /** + * BLOCK_ID_FLAG_COMMIT = 2 [(.gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; + */ + public static final int BLOCK_ID_FLAG_COMMIT_VALUE = 2; + /** + * BLOCK_ID_FLAG_NIL = 3 [(.gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; + */ + public static final int BLOCK_ID_FLAG_NIL_VALUE = 3; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static BlockIDFlag valueOf(int value) { + return forNumber(value); + } + + public static BlockIDFlag forNumber(int value) { + switch (value) { + case 0: return BLOCK_ID_FLAG_UNKNOWN; + case 1: return BLOCK_ID_FLAG_ABSENT; + case 2: return BLOCK_ID_FLAG_COMMIT; + case 3: return BLOCK_ID_FLAG_NIL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BlockIDFlag> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public BlockIDFlag findValueByNumber(int number) { + return BlockIDFlag.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return BlockIDFlagVerifier.INSTANCE; + } + + private static final class BlockIDFlagVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new BlockIDFlagVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return BlockIDFlag.forNumber(number) != null; + } + }; + + private final int value; + + private BlockIDFlag(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tendermint.types.BlockIDFlag) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDOrBuilder.java new file mode 100644 index 000000000..fe6320643 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockIDOrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface BlockIDOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.BlockID) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes hash = 1 [json_name = "hash"]; + * @return The hash. + */ + com.google.protobuf.ByteString getHash(); + + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + * @return Whether the partSetHeader field is set. + */ + boolean hasPartSetHeader(); + /** + * .tendermint.types.PartSetHeader part_set_header = 2 [json_name = "partSetHeader", (.gogoproto.nullable) = false]; + * @return The partSetHeader. + */ + com.tendermint.types.PartSetHeader getPartSetHeader(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMeta.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMeta.java new file mode 100644 index 000000000..6961de56d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMeta.java @@ -0,0 +1,482 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.BlockMeta} + */ +public final class BlockMeta extends + com.google.protobuf.GeneratedMessageLite< + BlockMeta, BlockMeta.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.BlockMeta) + BlockMetaOrBuilder { + private BlockMeta() { + } + public static final int BLOCK_ID_FIELD_NUMBER = 1; + private com.tendermint.types.BlockID blockId_; + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return blockId_ != null; + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return blockId_ == null ? com.tendermint.types.BlockID.getDefaultInstance() : blockId_; + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void setBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + blockId_ = value; + + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + if (blockId_ != null && + blockId_ != com.tendermint.types.BlockID.getDefaultInstance()) { + blockId_ = + com.tendermint.types.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); + } else { + blockId_ = value; + } + + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void clearBlockId() { blockId_ = null; + + } + + public static final int BLOCK_SIZE_FIELD_NUMBER = 2; + private long blockSize_; + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @return The blockSize. + */ + @java.lang.Override + public long getBlockSize() { + return blockSize_; + } + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @param value The blockSize to set. + */ + private void setBlockSize(long value) { + + blockSize_ = value; + } + /** + * int64 block_size = 2 [json_name = "blockSize"]; + */ + private void clearBlockSize() { + + blockSize_ = 0L; + } + + public static final int HEADER_FIELD_NUMBER = 3; + private com.tendermint.types.Header header_; + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.Header getHeader() { + return header_ == null ? com.tendermint.types.Header.getDefaultInstance() : header_; + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + private void setHeader(com.tendermint.types.Header value) { + value.getClass(); + header_ = value; + + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader(com.tendermint.types.Header value) { + value.getClass(); + if (header_ != null && + header_ != com.tendermint.types.Header.getDefaultInstance()) { + header_ = + com.tendermint.types.Header.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + private void clearHeader() { header_ = null; + + } + + public static final int NUM_TXS_FIELD_NUMBER = 4; + private long numTxs_; + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @return The numTxs. + */ + @java.lang.Override + public long getNumTxs() { + return numTxs_; + } + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @param value The numTxs to set. + */ + private void setNumTxs(long value) { + + numTxs_ = value; + } + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + */ + private void clearNumTxs() { + + numTxs_ = 0L; + } + + public static com.tendermint.types.BlockMeta parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockMeta parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockMeta parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockMeta parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockMeta parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.BlockMeta parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.BlockMeta parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockMeta parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.BlockMeta parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockMeta parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.BlockMeta parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.BlockMeta parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.BlockMeta prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.BlockMeta} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.BlockMeta, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.BlockMeta) + com.tendermint.types.BlockMetaOrBuilder { + // Construct using com.tendermint.types.BlockMeta.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return instance.hasBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return instance.getBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.setBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId( + com.tendermint.types.BlockID.Builder builderForValue) { + copyOnWrite(); + instance.setBlockId(builderForValue.build()); + return this; + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder mergeBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.mergeBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder clearBlockId() { copyOnWrite(); + instance.clearBlockId(); + return this; + } + + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @return The blockSize. + */ + @java.lang.Override + public long getBlockSize() { + return instance.getBlockSize(); + } + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @param value The blockSize to set. + * @return This builder for chaining. + */ + public Builder setBlockSize(long value) { + copyOnWrite(); + instance.setBlockSize(value); + return this; + } + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @return This builder for chaining. + */ + public Builder clearBlockSize() { + copyOnWrite(); + instance.clearBlockSize(); + return this; + } + + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasHeader() { + return instance.hasHeader(); + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.Header getHeader() { + return instance.getHeader(); + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + public Builder setHeader(com.tendermint.types.Header value) { + copyOnWrite(); + instance.setHeader(value); + return this; + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + public Builder setHeader( + com.tendermint.types.Header.Builder builderForValue) { + copyOnWrite(); + instance.setHeader(builderForValue.build()); + return this; + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + public Builder mergeHeader(com.tendermint.types.Header value) { + copyOnWrite(); + instance.mergeHeader(value); + return this; + } + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + */ + public Builder clearHeader() { copyOnWrite(); + instance.clearHeader(); + return this; + } + + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @return The numTxs. + */ + @java.lang.Override + public long getNumTxs() { + return instance.getNumTxs(); + } + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @param value The numTxs to set. + * @return This builder for chaining. + */ + public Builder setNumTxs(long value) { + copyOnWrite(); + instance.setNumTxs(value); + return this; + } + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @return This builder for chaining. + */ + public Builder clearNumTxs() { + copyOnWrite(); + instance.clearNumTxs(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.BlockMeta) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.BlockMeta(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "blockId_", + "blockSize_", + "header_", + "numTxs_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\u0002" + + "\u0003\t\u0004\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.BlockMeta.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.BlockMeta) + private static final com.tendermint.types.BlockMeta DEFAULT_INSTANCE; + static { + BlockMeta defaultInstance = new BlockMeta(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + BlockMeta.class, defaultInstance); + } + + public static com.tendermint.types.BlockMeta getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMetaOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMetaOrBuilder.java new file mode 100644 index 000000000..8608e4a3f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/BlockMetaOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface BlockMetaOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.BlockMeta) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return Whether the blockId field is set. + */ + boolean hasBlockId(); + /** + * .tendermint.types.BlockID block_id = 1 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return The blockId. + */ + com.tendermint.types.BlockID getBlockId(); + + /** + * int64 block_size = 2 [json_name = "blockSize"]; + * @return The blockSize. + */ + long getBlockSize(); + + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .tendermint.types.Header header = 3 [json_name = "header", (.gogoproto.nullable) = false]; + * @return The header. + */ + com.tendermint.types.Header getHeader(); + + /** + * int64 num_txs = 4 [json_name = "numTxs"]; + * @return The numTxs. + */ + long getNumTxs(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Commit.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Commit.java new file mode 100644 index 000000000..d104003bf --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Commit.java @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * Commit contains the evidence that a block was committed by a set of validators.
+ * 
+ * + * Protobuf type {@code tendermint.types.Commit} + */ +public final class Commit extends + com.google.protobuf.GeneratedMessageLite< + Commit, Commit.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Commit) + CommitOrBuilder { + private Commit() { + signatures_ = emptyProtobufList(); + } + public static final int HEIGHT_FIELD_NUMBER = 1; + private long height_; + /** + * int64 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * int64 height = 1 [json_name = "height"]; + * @param value The height to set. + */ + private void setHeight(long value) { + + height_ = value; + } + /** + * int64 height = 1 [json_name = "height"]; + */ + private void clearHeight() { + + height_ = 0L; + } + + public static final int ROUND_FIELD_NUMBER = 2; + private int round_; + /** + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + * int32 round = 2 [json_name = "round"]; + * @param value The round to set. + */ + private void setRound(int value) { + + round_ = value; + } + /** + * int32 round = 2 [json_name = "round"]; + */ + private void clearRound() { + + round_ = 0; + } + + public static final int BLOCK_ID_FIELD_NUMBER = 3; + private com.tendermint.types.BlockID blockId_; + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return blockId_ != null; + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return blockId_ == null ? com.tendermint.types.BlockID.getDefaultInstance() : blockId_; + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void setBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + blockId_ = value; + + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + if (blockId_ != null && + blockId_ != com.tendermint.types.BlockID.getDefaultInstance()) { + blockId_ = + com.tendermint.types.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); + } else { + blockId_ = value; + } + + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void clearBlockId() { blockId_ = null; + + } + + public static final int SIGNATURES_FIELD_NUMBER = 4; + private com.google.protobuf.Internal.ProtobufList signatures_; + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return signatures_; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public java.util.List + getSignaturesOrBuilderList() { + return signatures_; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.CommitSig getSignatures(int index) { + return signatures_.get(index); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public com.tendermint.types.CommitSigOrBuilder getSignaturesOrBuilder( + int index) { + return signatures_.get(index); + } + private void ensureSignaturesIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = signatures_; + if (!tmp.isModifiable()) { + signatures_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void setSignatures( + int index, com.tendermint.types.CommitSig value) { + value.getClass(); + ensureSignaturesIsMutable(); + signatures_.set(index, value); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void addSignatures(com.tendermint.types.CommitSig value) { + value.getClass(); + ensureSignaturesIsMutable(); + signatures_.add(value); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void addSignatures( + int index, com.tendermint.types.CommitSig value) { + value.getClass(); + ensureSignaturesIsMutable(); + signatures_.add(index, value); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void addAllSignatures( + java.lang.Iterable values) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, signatures_); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void clearSignatures() { + signatures_ = emptyProtobufList(); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + private void removeSignatures(int index) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + } + + public static com.tendermint.types.Commit parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Commit parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Commit parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Commit parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Commit parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Commit parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Commit parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Commit parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Commit parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Commit parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Commit parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Commit parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Commit prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Commit contains the evidence that a block was committed by a set of validators.
+   * 
+ * + * Protobuf type {@code tendermint.types.Commit} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Commit, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Commit) + com.tendermint.types.CommitOrBuilder { + // Construct using com.tendermint.types.Commit.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * int64 height = 1 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return instance.getHeight(); + } + /** + * int64 height = 1 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + * int64 height = 1 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return instance.getRound(); + } + /** + * int32 round = 2 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + copyOnWrite(); + instance.setRound(value); + return this; + } + /** + * int32 round = 2 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + copyOnWrite(); + instance.clearRound(); + return this; + } + + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return instance.hasBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return instance.getBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.setBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId( + com.tendermint.types.BlockID.Builder builderForValue) { + copyOnWrite(); + instance.setBlockId(builderForValue.build()); + return this; + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder mergeBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.mergeBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder clearBlockId() { copyOnWrite(); + instance.clearBlockId(); + return this; + } + + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public java.util.List getSignaturesList() { + return java.util.Collections.unmodifiableList( + instance.getSignaturesList()); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public int getSignaturesCount() { + return instance.getSignaturesCount(); + }/** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.CommitSig getSignatures(int index) { + return instance.getSignatures(index); + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder setSignatures( + int index, com.tendermint.types.CommitSig value) { + copyOnWrite(); + instance.setSignatures(index, value); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder setSignatures( + int index, com.tendermint.types.CommitSig.Builder builderForValue) { + copyOnWrite(); + instance.setSignatures(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder addSignatures(com.tendermint.types.CommitSig value) { + copyOnWrite(); + instance.addSignatures(value); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder addSignatures( + int index, com.tendermint.types.CommitSig value) { + copyOnWrite(); + instance.addSignatures(index, value); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder addSignatures( + com.tendermint.types.CommitSig.Builder builderForValue) { + copyOnWrite(); + instance.addSignatures(builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder addSignatures( + int index, com.tendermint.types.CommitSig.Builder builderForValue) { + copyOnWrite(); + instance.addSignatures(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder addAllSignatures( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllSignatures(values); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder clearSignatures() { + copyOnWrite(); + instance.clearSignatures(); + return this; + } + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + public Builder removeSignatures(int index) { + copyOnWrite(); + instance.removeSignatures(index); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Commit) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Commit(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "height_", + "round_", + "blockId_", + "signatures_", + com.tendermint.types.CommitSig.class, + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0001\u0000\u0001\u0002\u0002\u0004" + + "\u0003\t\u0004\u001b"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Commit.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Commit) + private static final com.tendermint.types.Commit DEFAULT_INSTANCE; + static { + Commit defaultInstance = new Commit(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Commit.class, defaultInstance); + } + + public static com.tendermint.types.Commit getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitOrBuilder.java new file mode 100644 index 000000000..8e7f43d25 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface CommitOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Commit) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * int64 height = 1 [json_name = "height"]; + * @return The height. + */ + long getHeight(); + + /** + * int32 round = 2 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return Whether the blockId field is set. + */ + boolean hasBlockId(); + /** + * .tendermint.types.BlockID block_id = 3 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return The blockId. + */ + com.tendermint.types.BlockID getBlockId(); + + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + java.util.List + getSignaturesList(); + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + com.tendermint.types.CommitSig getSignatures(int index); + /** + * repeated .tendermint.types.CommitSig signatures = 4 [json_name = "signatures", (.gogoproto.nullable) = false]; + */ + int getSignaturesCount(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSig.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSig.java new file mode 100644 index 000000000..ef30d6f62 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSig.java @@ -0,0 +1,489 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * CommitSig is a part of the Vote included in a Commit.
+ * 
+ * + * Protobuf type {@code tendermint.types.CommitSig} + */ +public final class CommitSig extends + com.google.protobuf.GeneratedMessageLite< + CommitSig, CommitSig.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.CommitSig) + CommitSigOrBuilder { + private CommitSig() { + validatorAddress_ = com.google.protobuf.ByteString.EMPTY; + signature_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int BLOCK_ID_FLAG_FIELD_NUMBER = 1; + private int blockIdFlag_; + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The enum numeric value on the wire for blockIdFlag. + */ + @java.lang.Override + public int getBlockIdFlagValue() { + return blockIdFlag_; + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The blockIdFlag. + */ + @java.lang.Override + public com.tendermint.types.BlockIDFlag getBlockIdFlag() { + com.tendermint.types.BlockIDFlag result = com.tendermint.types.BlockIDFlag.forNumber(blockIdFlag_); + return result == null ? com.tendermint.types.BlockIDFlag.UNRECOGNIZED : result; + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @param value The enum numeric value on the wire for blockIdFlag to set. + */ + private void setBlockIdFlagValue(int value) { + blockIdFlag_ = value; + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @param value The blockIdFlag to set. + */ + private void setBlockIdFlag(com.tendermint.types.BlockIDFlag value) { + blockIdFlag_ = value.getNumber(); + + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + */ + private void clearBlockIdFlag() { + + blockIdFlag_ = 0; + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString validatorAddress_; + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorAddress() { + return validatorAddress_; + } + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + */ + private void setValidatorAddress(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + validatorAddress_ = value; + } + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + */ + private void clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + } + + public static final int TIMESTAMP_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp timestamp_; + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void setTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + timestamp_ = value; + + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + if (timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void clearTimestamp() { timestamp_ = null; + + } + + public static final int SIGNATURE_FIELD_NUMBER = 4; + private com.google.protobuf.ByteString signature_; + /** + * bytes signature = 4 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + * bytes signature = 4 [json_name = "signature"]; + * @param value The signature to set. + */ + private void setSignature(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + signature_ = value; + } + /** + * bytes signature = 4 [json_name = "signature"]; + */ + private void clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + } + + public static com.tendermint.types.CommitSig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.CommitSig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.CommitSig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.CommitSig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.CommitSig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.CommitSig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.CommitSig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.CommitSig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.CommitSig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.CommitSig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.CommitSig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.CommitSig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.CommitSig prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * CommitSig is a part of the Vote included in a Commit.
+   * 
+ * + * Protobuf type {@code tendermint.types.CommitSig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.CommitSig, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.CommitSig) + com.tendermint.types.CommitSigOrBuilder { + // Construct using com.tendermint.types.CommitSig.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The enum numeric value on the wire for blockIdFlag. + */ + @java.lang.Override + public int getBlockIdFlagValue() { + return instance.getBlockIdFlagValue(); + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @param value The blockIdFlag to set. + * @return This builder for chaining. + */ + public Builder setBlockIdFlagValue(int value) { + copyOnWrite(); + instance.setBlockIdFlagValue(value); + return this; + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The blockIdFlag. + */ + @java.lang.Override + public com.tendermint.types.BlockIDFlag getBlockIdFlag() { + return instance.getBlockIdFlag(); + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @param value The enum numeric value on the wire for blockIdFlag to set. + * @return This builder for chaining. + */ + public Builder setBlockIdFlag(com.tendermint.types.BlockIDFlag value) { + copyOnWrite(); + instance.setBlockIdFlag(value); + return this; + } + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return This builder for chaining. + */ + public Builder clearBlockIdFlag() { + copyOnWrite(); + instance.clearBlockIdFlag(); + return this; + } + + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorAddress() { + return instance.getValidatorAddress(); + } + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValidatorAddress(value); + return this; + } + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + copyOnWrite(); + instance.clearValidatorAddress(); + return this; + } + + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return instance.hasTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return instance.getTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTimestamp(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder clearTimestamp() { copyOnWrite(); + instance.clearTimestamp(); + return this; + } + + /** + * bytes signature = 4 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return instance.getSignature(); + } + /** + * bytes signature = 4 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSignature(value); + return this; + } + /** + * bytes signature = 4 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + copyOnWrite(); + instance.clearSignature(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.CommitSig) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.CommitSig(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "blockIdFlag_", + "validatorAddress_", + "timestamp_", + "signature_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\f\u0002\n\u0003" + + "\t\u0004\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.CommitSig.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.CommitSig) + private static final com.tendermint.types.CommitSig DEFAULT_INSTANCE; + static { + CommitSig defaultInstance = new CommitSig(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + CommitSig.class, defaultInstance); + } + + public static com.tendermint.types.CommitSig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSigOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSigOrBuilder.java new file mode 100644 index 000000000..62188f063 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/CommitSigOrBuilder.java @@ -0,0 +1,43 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface CommitSigOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.CommitSig) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The enum numeric value on the wire for blockIdFlag. + */ + int getBlockIdFlagValue(); + /** + * .tendermint.types.BlockIDFlag block_id_flag = 1 [json_name = "blockIdFlag"]; + * @return The blockIdFlag. + */ + com.tendermint.types.BlockIDFlag getBlockIdFlag(); + + /** + * bytes validator_address = 2 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + com.google.protobuf.ByteString getValidatorAddress(); + + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * .google.protobuf.Timestamp timestamp = 3 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + * bytes signature = 4 [json_name = "signature"]; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Data.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Data.java new file mode 100644 index 000000000..f7330f3c2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Data.java @@ -0,0 +1,418 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * Data contains the set of transactions included in the block
+ * 
+ * + * Protobuf type {@code tendermint.types.Data} + */ +public final class Data extends + com.google.protobuf.GeneratedMessageLite< + Data, Data.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Data) + DataOrBuilder { + private Data() { + txs_ = emptyProtobufList(); + } + public static final int TXS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList txs_; + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return A list containing the txs. + */ + @java.lang.Override + public java.util.List + getTxsList() { + return txs_; + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return The count of txs. + */ + @java.lang.Override + public int getTxsCount() { + return txs_.size(); + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param index The index of the element to return. + * @return The txs at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTxs(int index) { + return txs_.get(index); + } + private void ensureTxsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = txs_; + if (!tmp.isModifiable()) { + txs_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param index The index to set the value at. + * @param value The txs to set. + */ + private void setTxs( + int index, com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureTxsIsMutable(); + txs_.set(index, value); + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param value The txs to add. + */ + private void addTxs(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + ensureTxsIsMutable(); + txs_.add(value); + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param values The txs to add. + */ + private void addAllTxs( + java.lang.Iterable values) { + ensureTxsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, txs_); + } + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + */ + private void clearTxs() { + txs_ = emptyProtobufList(); + } + + public static com.tendermint.types.Data parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Data parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Data parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Data parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Data parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Data parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Data parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Data parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Data parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Data parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Data parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Data parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Data prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Data contains the set of transactions included in the block
+   * 
+ * + * Protobuf type {@code tendermint.types.Data} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Data, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Data) + com.tendermint.types.DataOrBuilder { + // Construct using com.tendermint.types.Data.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return A list containing the txs. + */ + @java.lang.Override + public java.util.List + getTxsList() { + return java.util.Collections.unmodifiableList( + instance.getTxsList()); + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return The count of txs. + */ + @java.lang.Override + public int getTxsCount() { + return instance.getTxsCount(); + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param index The index of the element to return. + * @return The txs at the given index. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTxs(int index) { + return instance.getTxs(index); + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param value The txs to set. + * @return This builder for chaining. + */ + public Builder setTxs( + int index, com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setTxs(index, value); + return this; + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param value The txs to add. + * @return This builder for chaining. + */ + public Builder addTxs(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.addTxs(value); + return this; + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param values The txs to add. + * @return This builder for chaining. + */ + public Builder addAllTxs( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllTxs(values); + return this; + } + /** + *
+     * Txs that will be applied by state @ block.Height+1.
+     * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+     * This means that block.AppHash does not include these txs.
+     * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return This builder for chaining. + */ + public Builder clearTxs() { + copyOnWrite(); + instance.clearTxs(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Data) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Data(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "txs_", + }; + java.lang.String info = + "\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u001c"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Data.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Data) + private static final com.tendermint.types.Data DEFAULT_INSTANCE; + static { + Data defaultInstance = new Data(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Data.class, defaultInstance); + } + + public static com.tendermint.types.Data getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/DataOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/DataOrBuilder.java new file mode 100644 index 000000000..ce646fa51 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/DataOrBuilder.java @@ -0,0 +1,44 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface DataOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Data) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return A list containing the txs. + */ + java.util.List getTxsList(); + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @return The count of txs. + */ + int getTxsCount(); + /** + *
+   * Txs that will be applied by state @ block.Height+1.
+   * NOTE: not all txs here are valid.  We're just agreeing on the order first.
+   * This means that block.AppHash does not include these txs.
+   * 
+ * + * repeated bytes txs = 1 [json_name = "txs"]; + * @param index The index of the element to return. + * @return The txs at the given index. + */ + com.google.protobuf.ByteString getTxs(int index); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Header.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Header.java new file mode 100644 index 000000000..e6c5838bf --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Header.java @@ -0,0 +1,1445 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * Header defines the structure of a block header.
+ * 
+ * + * Protobuf type {@code tendermint.types.Header} + */ +public final class Header extends + com.google.protobuf.GeneratedMessageLite< + Header, Header.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Header) + HeaderOrBuilder { + private Header() { + chainId_ = ""; + lastCommitHash_ = com.google.protobuf.ByteString.EMPTY; + dataHash_ = com.google.protobuf.ByteString.EMPTY; + validatorsHash_ = com.google.protobuf.ByteString.EMPTY; + nextValidatorsHash_ = com.google.protobuf.ByteString.EMPTY; + consensusHash_ = com.google.protobuf.ByteString.EMPTY; + appHash_ = com.google.protobuf.ByteString.EMPTY; + lastResultsHash_ = com.google.protobuf.ByteString.EMPTY; + evidenceHash_ = com.google.protobuf.ByteString.EMPTY; + proposerAddress_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int VERSION_FIELD_NUMBER = 1; + private com.tendermint.version.Consensus version_; + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasVersion() { + return version_ != null; + } + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.version.Consensus getVersion() { + return version_ == null ? com.tendermint.version.Consensus.getDefaultInstance() : version_; + } + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + private void setVersion(com.tendermint.version.Consensus value) { + value.getClass(); + version_ = value; + + } + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeVersion(com.tendermint.version.Consensus value) { + value.getClass(); + if (version_ != null && + version_ != com.tendermint.version.Consensus.getDefaultInstance()) { + version_ = + com.tendermint.version.Consensus.newBuilder(version_).mergeFrom(value).buildPartial(); + } else { + version_ = value; + } + + } + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + private void clearVersion() { version_ = null; + + } + + public static final int CHAIN_ID_FIELD_NUMBER = 2; + private java.lang.String chainId_; + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The chainId. + */ + @java.lang.Override + public java.lang.String getChainId() { + return chainId_; + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The bytes for chainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChainIdBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(chainId_); + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @param value The chainId to set. + */ + private void setChainId( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + chainId_ = value; + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + */ + private void clearChainId() { + + chainId_ = getDefaultInstance().getChainId(); + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @param value The bytes for chainId to set. + */ + private void setChainIdBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + chainId_ = value.toStringUtf8(); + + } + + public static final int HEIGHT_FIELD_NUMBER = 3; + private long height_; + /** + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * int64 height = 3 [json_name = "height"]; + * @param value The height to set. + */ + private void setHeight(long value) { + + height_ = value; + } + /** + * int64 height = 3 [json_name = "height"]; + */ + private void clearHeight() { + + height_ = 0L; + } + + public static final int TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp time_; + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTime() { + return time_ != null; + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTime() { + return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_; + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void setTime(com.google.protobuf.Timestamp value) { + value.getClass(); + time_ = value; + + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTime(com.google.protobuf.Timestamp value) { + value.getClass(); + if (time_ != null && + time_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + time_ = + com.google.protobuf.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial(); + } else { + time_ = value; + } + + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void clearTime() { time_ = null; + + } + + public static final int LAST_BLOCK_ID_FIELD_NUMBER = 5; + private com.tendermint.types.BlockID lastBlockId_; + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasLastBlockId() { + return lastBlockId_ != null; + } + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getLastBlockId() { + return lastBlockId_ == null ? com.tendermint.types.BlockID.getDefaultInstance() : lastBlockId_; + } + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + private void setLastBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + lastBlockId_ = value; + + } + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeLastBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + if (lastBlockId_ != null && + lastBlockId_ != com.tendermint.types.BlockID.getDefaultInstance()) { + lastBlockId_ = + com.tendermint.types.BlockID.newBuilder(lastBlockId_).mergeFrom(value).buildPartial(); + } else { + lastBlockId_ = value; + } + + } + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + private void clearLastBlockId() { lastBlockId_ = null; + + } + + public static final int LAST_COMMIT_HASH_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString lastCommitHash_; + /** + *
+   * hashes of block data
+   * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @return The lastCommitHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastCommitHash() { + return lastCommitHash_; + } + /** + *
+   * hashes of block data
+   * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @param value The lastCommitHash to set. + */ + private void setLastCommitHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + lastCommitHash_ = value; + } + /** + *
+   * hashes of block data
+   * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + */ + private void clearLastCommitHash() { + + lastCommitHash_ = getDefaultInstance().getLastCommitHash(); + } + + public static final int DATA_HASH_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString dataHash_; + /** + *
+   * transactions
+   * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @return The dataHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataHash() { + return dataHash_; + } + /** + *
+   * transactions
+   * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @param value The dataHash to set. + */ + private void setDataHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + dataHash_ = value; + } + /** + *
+   * transactions
+   * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + */ + private void clearDataHash() { + + dataHash_ = getDefaultInstance().getDataHash(); + } + + public static final int VALIDATORS_HASH_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString validatorsHash_; + /** + *
+   * hashes from the app output from the prev block
+   * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @return The validatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorsHash() { + return validatorsHash_; + } + /** + *
+   * hashes from the app output from the prev block
+   * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @param value The validatorsHash to set. + */ + private void setValidatorsHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + validatorsHash_ = value; + } + /** + *
+   * hashes from the app output from the prev block
+   * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + */ + private void clearValidatorsHash() { + + validatorsHash_ = getDefaultInstance().getValidatorsHash(); + } + + public static final int NEXT_VALIDATORS_HASH_FIELD_NUMBER = 9; + private com.google.protobuf.ByteString nextValidatorsHash_; + /** + *
+   * validators for the next block
+   * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @return The nextValidatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidatorsHash() { + return nextValidatorsHash_; + } + /** + *
+   * validators for the next block
+   * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @param value The nextValidatorsHash to set. + */ + private void setNextValidatorsHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + nextValidatorsHash_ = value; + } + /** + *
+   * validators for the next block
+   * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + */ + private void clearNextValidatorsHash() { + + nextValidatorsHash_ = getDefaultInstance().getNextValidatorsHash(); + } + + public static final int CONSENSUS_HASH_FIELD_NUMBER = 10; + private com.google.protobuf.ByteString consensusHash_; + /** + *
+   * consensus params for current block
+   * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @return The consensusHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConsensusHash() { + return consensusHash_; + } + /** + *
+   * consensus params for current block
+   * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @param value The consensusHash to set. + */ + private void setConsensusHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + consensusHash_ = value; + } + /** + *
+   * consensus params for current block
+   * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + */ + private void clearConsensusHash() { + + consensusHash_ = getDefaultInstance().getConsensusHash(); + } + + public static final int APP_HASH_FIELD_NUMBER = 11; + private com.google.protobuf.ByteString appHash_; + /** + *
+   * state after txs from the previous block
+   * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @return The appHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppHash() { + return appHash_; + } + /** + *
+   * state after txs from the previous block
+   * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @param value The appHash to set. + */ + private void setAppHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + appHash_ = value; + } + /** + *
+   * state after txs from the previous block
+   * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + */ + private void clearAppHash() { + + appHash_ = getDefaultInstance().getAppHash(); + } + + public static final int LAST_RESULTS_HASH_FIELD_NUMBER = 12; + private com.google.protobuf.ByteString lastResultsHash_; + /** + *
+   * root hash of all results from the txs from the previous block
+   * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @return The lastResultsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastResultsHash() { + return lastResultsHash_; + } + /** + *
+   * root hash of all results from the txs from the previous block
+   * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @param value The lastResultsHash to set. + */ + private void setLastResultsHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + lastResultsHash_ = value; + } + /** + *
+   * root hash of all results from the txs from the previous block
+   * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + */ + private void clearLastResultsHash() { + + lastResultsHash_ = getDefaultInstance().getLastResultsHash(); + } + + public static final int EVIDENCE_HASH_FIELD_NUMBER = 13; + private com.google.protobuf.ByteString evidenceHash_; + /** + *
+   * consensus info
+   * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @return The evidenceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEvidenceHash() { + return evidenceHash_; + } + /** + *
+   * consensus info
+   * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @param value The evidenceHash to set. + */ + private void setEvidenceHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + evidenceHash_ = value; + } + /** + *
+   * consensus info
+   * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + */ + private void clearEvidenceHash() { + + evidenceHash_ = getDefaultInstance().getEvidenceHash(); + } + + public static final int PROPOSER_ADDRESS_FIELD_NUMBER = 14; + private com.google.protobuf.ByteString proposerAddress_; + /** + *
+   * original proposer of the block
+   * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProposerAddress() { + return proposerAddress_; + } + /** + *
+   * original proposer of the block
+   * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @param value The proposerAddress to set. + */ + private void setProposerAddress(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + proposerAddress_ = value; + } + /** + *
+   * original proposer of the block
+   * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + */ + private void clearProposerAddress() { + + proposerAddress_ = getDefaultInstance().getProposerAddress(); + } + + public static com.tendermint.types.Header parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Header parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Header parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Header parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Header parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Header parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Header parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Header parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Header parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Header parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Header parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Header parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Header prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Header defines the structure of a block header.
+   * 
+ * + * Protobuf type {@code tendermint.types.Header} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Header, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Header) + com.tendermint.types.HeaderOrBuilder { + // Construct using com.tendermint.types.Header.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasVersion() { + return instance.hasVersion(); + } + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.version.Consensus getVersion() { + return instance.getVersion(); + } + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + public Builder setVersion(com.tendermint.version.Consensus value) { + copyOnWrite(); + instance.setVersion(value); + return this; + } + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + public Builder setVersion( + com.tendermint.version.Consensus.Builder builderForValue) { + copyOnWrite(); + instance.setVersion(builderForValue.build()); + return this; + } + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + public Builder mergeVersion(com.tendermint.version.Consensus value) { + copyOnWrite(); + instance.mergeVersion(value); + return this; + } + /** + *
+     * basic block info
+     * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + */ + public Builder clearVersion() { copyOnWrite(); + instance.clearVersion(); + return this; + } + + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The chainId. + */ + @java.lang.Override + public java.lang.String getChainId() { + return instance.getChainId(); + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The bytes for chainId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getChainIdBytes() { + return instance.getChainIdBytes(); + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @param value The chainId to set. + * @return This builder for chaining. + */ + public Builder setChainId( + java.lang.String value) { + copyOnWrite(); + instance.setChainId(value); + return this; + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return This builder for chaining. + */ + public Builder clearChainId() { + copyOnWrite(); + instance.clearChainId(); + return this; + } + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @param value The bytes for chainId to set. + * @return This builder for chaining. + */ + public Builder setChainIdBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setChainIdBytes(value); + return this; + } + + /** + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return instance.getHeight(); + } + /** + * int64 height = 3 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + * int64 height = 3 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTime() { + return instance.hasTime(); + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTime() { + return instance.getTime(); + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTime(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTime(value); + return this; + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTime(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder mergeTime(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTime(value); + return this; + } + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder clearTime() { copyOnWrite(); + instance.clearTime(); + return this; + } + + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasLastBlockId() { + return instance.hasLastBlockId(); + } + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getLastBlockId() { + return instance.getLastBlockId(); + } + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + public Builder setLastBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.setLastBlockId(value); + return this; + } + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + public Builder setLastBlockId( + com.tendermint.types.BlockID.Builder builderForValue) { + copyOnWrite(); + instance.setLastBlockId(builderForValue.build()); + return this; + } + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + public Builder mergeLastBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.mergeLastBlockId(value); + return this; + } + /** + *
+     * prev block info
+     * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + */ + public Builder clearLastBlockId() { copyOnWrite(); + instance.clearLastBlockId(); + return this; + } + + /** + *
+     * hashes of block data
+     * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @return The lastCommitHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastCommitHash() { + return instance.getLastCommitHash(); + } + /** + *
+     * hashes of block data
+     * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @param value The lastCommitHash to set. + * @return This builder for chaining. + */ + public Builder setLastCommitHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setLastCommitHash(value); + return this; + } + /** + *
+     * hashes of block data
+     * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @return This builder for chaining. + */ + public Builder clearLastCommitHash() { + copyOnWrite(); + instance.clearLastCommitHash(); + return this; + } + + /** + *
+     * transactions
+     * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @return The dataHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataHash() { + return instance.getDataHash(); + } + /** + *
+     * transactions
+     * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @param value The dataHash to set. + * @return This builder for chaining. + */ + public Builder setDataHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setDataHash(value); + return this; + } + /** + *
+     * transactions
+     * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @return This builder for chaining. + */ + public Builder clearDataHash() { + copyOnWrite(); + instance.clearDataHash(); + return this; + } + + /** + *
+     * hashes from the app output from the prev block
+     * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @return The validatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorsHash() { + return instance.getValidatorsHash(); + } + /** + *
+     * hashes from the app output from the prev block
+     * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @param value The validatorsHash to set. + * @return This builder for chaining. + */ + public Builder setValidatorsHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValidatorsHash(value); + return this; + } + /** + *
+     * hashes from the app output from the prev block
+     * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @return This builder for chaining. + */ + public Builder clearValidatorsHash() { + copyOnWrite(); + instance.clearValidatorsHash(); + return this; + } + + /** + *
+     * validators for the next block
+     * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @return The nextValidatorsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextValidatorsHash() { + return instance.getNextValidatorsHash(); + } + /** + *
+     * validators for the next block
+     * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @param value The nextValidatorsHash to set. + * @return This builder for chaining. + */ + public Builder setNextValidatorsHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setNextValidatorsHash(value); + return this; + } + /** + *
+     * validators for the next block
+     * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @return This builder for chaining. + */ + public Builder clearNextValidatorsHash() { + copyOnWrite(); + instance.clearNextValidatorsHash(); + return this; + } + + /** + *
+     * consensus params for current block
+     * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @return The consensusHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConsensusHash() { + return instance.getConsensusHash(); + } + /** + *
+     * consensus params for current block
+     * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @param value The consensusHash to set. + * @return This builder for chaining. + */ + public Builder setConsensusHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setConsensusHash(value); + return this; + } + /** + *
+     * consensus params for current block
+     * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @return This builder for chaining. + */ + public Builder clearConsensusHash() { + copyOnWrite(); + instance.clearConsensusHash(); + return this; + } + + /** + *
+     * state after txs from the previous block
+     * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @return The appHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAppHash() { + return instance.getAppHash(); + } + /** + *
+     * state after txs from the previous block
+     * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @param value The appHash to set. + * @return This builder for chaining. + */ + public Builder setAppHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setAppHash(value); + return this; + } + /** + *
+     * state after txs from the previous block
+     * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @return This builder for chaining. + */ + public Builder clearAppHash() { + copyOnWrite(); + instance.clearAppHash(); + return this; + } + + /** + *
+     * root hash of all results from the txs from the previous block
+     * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @return The lastResultsHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastResultsHash() { + return instance.getLastResultsHash(); + } + /** + *
+     * root hash of all results from the txs from the previous block
+     * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @param value The lastResultsHash to set. + * @return This builder for chaining. + */ + public Builder setLastResultsHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setLastResultsHash(value); + return this; + } + /** + *
+     * root hash of all results from the txs from the previous block
+     * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @return This builder for chaining. + */ + public Builder clearLastResultsHash() { + copyOnWrite(); + instance.clearLastResultsHash(); + return this; + } + + /** + *
+     * consensus info
+     * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @return The evidenceHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEvidenceHash() { + return instance.getEvidenceHash(); + } + /** + *
+     * consensus info
+     * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @param value The evidenceHash to set. + * @return This builder for chaining. + */ + public Builder setEvidenceHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setEvidenceHash(value); + return this; + } + /** + *
+     * consensus info
+     * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @return This builder for chaining. + */ + public Builder clearEvidenceHash() { + copyOnWrite(); + instance.clearEvidenceHash(); + return this; + } + + /** + *
+     * original proposer of the block
+     * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProposerAddress() { + return instance.getProposerAddress(); + } + /** + *
+     * original proposer of the block
+     * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @param value The proposerAddress to set. + * @return This builder for chaining. + */ + public Builder setProposerAddress(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setProposerAddress(value); + return this; + } + /** + *
+     * original proposer of the block
+     * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @return This builder for chaining. + */ + public Builder clearProposerAddress() { + copyOnWrite(); + instance.clearProposerAddress(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Header) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Header(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "version_", + "chainId_", + "height_", + "time_", + "lastBlockId_", + "lastCommitHash_", + "dataHash_", + "validatorsHash_", + "nextValidatorsHash_", + "consensusHash_", + "appHash_", + "lastResultsHash_", + "evidenceHash_", + "proposerAddress_", + }; + java.lang.String info = + "\u0000\u000e\u0000\u0000\u0001\u000e\u000e\u0000\u0000\u0000\u0001\t\u0002\u0208" + + "\u0003\u0002\u0004\t\u0005\t\u0006\n\u0007\n\b\n\t\n\n\n\u000b\n\f\n\r\n\u000e\n" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Header.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Header) + private static final com.tendermint.types.Header DEFAULT_INSTANCE; + static { + Header defaultInstance = new Header(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Header.class, defaultInstance); + } + + public static com.tendermint.types.Header getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser
PARSER; + + public static com.google.protobuf.Parser
parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/HeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/HeaderOrBuilder.java new file mode 100644 index 000000000..05bc1259b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/HeaderOrBuilder.java @@ -0,0 +1,166 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface HeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Header) + com.google.protobuf.MessageLiteOrBuilder { + + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + * @return Whether the version field is set. + */ + boolean hasVersion(); + /** + *
+   * basic block info
+   * 
+ * + * .tendermint.version.Consensus version = 1 [json_name = "version", (.gogoproto.nullable) = false]; + * @return The version. + */ + com.tendermint.version.Consensus getVersion(); + + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The chainId. + */ + java.lang.String getChainId(); + /** + * string chain_id = 2 [json_name = "chainId", (.gogoproto.customname) = "ChainID"]; + * @return The bytes for chainId. + */ + com.google.protobuf.ByteString + getChainIdBytes(); + + /** + * int64 height = 3 [json_name = "height"]; + * @return The height. + */ + long getHeight(); + + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return Whether the time field is set. + */ + boolean hasTime(); + /** + * .google.protobuf.Timestamp time = 4 [json_name = "time", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return The time. + */ + com.google.protobuf.Timestamp getTime(); + + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + * @return Whether the lastBlockId field is set. + */ + boolean hasLastBlockId(); + /** + *
+   * prev block info
+   * 
+ * + * .tendermint.types.BlockID last_block_id = 5 [json_name = "lastBlockId", (.gogoproto.nullable) = false]; + * @return The lastBlockId. + */ + com.tendermint.types.BlockID getLastBlockId(); + + /** + *
+   * hashes of block data
+   * 
+ * + * bytes last_commit_hash = 6 [json_name = "lastCommitHash"]; + * @return The lastCommitHash. + */ + com.google.protobuf.ByteString getLastCommitHash(); + + /** + *
+   * transactions
+   * 
+ * + * bytes data_hash = 7 [json_name = "dataHash"]; + * @return The dataHash. + */ + com.google.protobuf.ByteString getDataHash(); + + /** + *
+   * hashes from the app output from the prev block
+   * 
+ * + * bytes validators_hash = 8 [json_name = "validatorsHash"]; + * @return The validatorsHash. + */ + com.google.protobuf.ByteString getValidatorsHash(); + + /** + *
+   * validators for the next block
+   * 
+ * + * bytes next_validators_hash = 9 [json_name = "nextValidatorsHash"]; + * @return The nextValidatorsHash. + */ + com.google.protobuf.ByteString getNextValidatorsHash(); + + /** + *
+   * consensus params for current block
+   * 
+ * + * bytes consensus_hash = 10 [json_name = "consensusHash"]; + * @return The consensusHash. + */ + com.google.protobuf.ByteString getConsensusHash(); + + /** + *
+   * state after txs from the previous block
+   * 
+ * + * bytes app_hash = 11 [json_name = "appHash"]; + * @return The appHash. + */ + com.google.protobuf.ByteString getAppHash(); + + /** + *
+   * root hash of all results from the txs from the previous block
+   * 
+ * + * bytes last_results_hash = 12 [json_name = "lastResultsHash"]; + * @return The lastResultsHash. + */ + com.google.protobuf.ByteString getLastResultsHash(); + + /** + *
+   * consensus info
+   * 
+ * + * bytes evidence_hash = 13 [json_name = "evidenceHash"]; + * @return The evidenceHash. + */ + com.google.protobuf.ByteString getEvidenceHash(); + + /** + *
+   * original proposer of the block
+   * 
+ * + * bytes proposer_address = 14 [json_name = "proposerAddress"]; + * @return The proposerAddress. + */ + com.google.protobuf.ByteString getProposerAddress(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlock.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlock.java new file mode 100644 index 000000000..0ef7866b4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlock.java @@ -0,0 +1,371 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.LightBlock} + */ +public final class LightBlock extends + com.google.protobuf.GeneratedMessageLite< + LightBlock, LightBlock.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.LightBlock) + LightBlockOrBuilder { + private LightBlock() { + } + public static final int SIGNED_HEADER_FIELD_NUMBER = 1; + private com.tendermint.types.SignedHeader signedHeader_; + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + @java.lang.Override + public boolean hasSignedHeader() { + return signedHeader_ != null; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + @java.lang.Override + public com.tendermint.types.SignedHeader getSignedHeader() { + return signedHeader_ == null ? com.tendermint.types.SignedHeader.getDefaultInstance() : signedHeader_; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + private void setSignedHeader(com.tendermint.types.SignedHeader value) { + value.getClass(); + signedHeader_ = value; + + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeSignedHeader(com.tendermint.types.SignedHeader value) { + value.getClass(); + if (signedHeader_ != null && + signedHeader_ != com.tendermint.types.SignedHeader.getDefaultInstance()) { + signedHeader_ = + com.tendermint.types.SignedHeader.newBuilder(signedHeader_).mergeFrom(value).buildPartial(); + } else { + signedHeader_ = value; + } + + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + private void clearSignedHeader() { signedHeader_ = null; + + } + + public static final int VALIDATOR_SET_FIELD_NUMBER = 2; + private com.tendermint.types.ValidatorSet validatorSet_; + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public boolean hasValidatorSet() { + return validatorSet_ != null; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getValidatorSet() { + return validatorSet_ == null ? com.tendermint.types.ValidatorSet.getDefaultInstance() : validatorSet_; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + private void setValidatorSet(com.tendermint.types.ValidatorSet value) { + value.getClass(); + validatorSet_ = value; + + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeValidatorSet(com.tendermint.types.ValidatorSet value) { + value.getClass(); + if (validatorSet_ != null && + validatorSet_ != com.tendermint.types.ValidatorSet.getDefaultInstance()) { + validatorSet_ = + com.tendermint.types.ValidatorSet.newBuilder(validatorSet_).mergeFrom(value).buildPartial(); + } else { + validatorSet_ = value; + } + + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + private void clearValidatorSet() { validatorSet_ = null; + + } + + public static com.tendermint.types.LightBlock parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.LightBlock parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.LightBlock parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.LightBlock parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.LightBlock parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.LightBlock parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.LightBlock parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.LightBlock parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.LightBlock parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.LightBlock parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.LightBlock parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.LightBlock parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.LightBlock prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.LightBlock} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.LightBlock, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.LightBlock) + com.tendermint.types.LightBlockOrBuilder { + // Construct using com.tendermint.types.LightBlock.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + @java.lang.Override + public boolean hasSignedHeader() { + return instance.hasSignedHeader(); + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + @java.lang.Override + public com.tendermint.types.SignedHeader getSignedHeader() { + return instance.getSignedHeader(); + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + public Builder setSignedHeader(com.tendermint.types.SignedHeader value) { + copyOnWrite(); + instance.setSignedHeader(value); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + public Builder setSignedHeader( + com.tendermint.types.SignedHeader.Builder builderForValue) { + copyOnWrite(); + instance.setSignedHeader(builderForValue.build()); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + public Builder mergeSignedHeader(com.tendermint.types.SignedHeader value) { + copyOnWrite(); + instance.mergeSignedHeader(value); + return this; + } + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + */ + public Builder clearSignedHeader() { copyOnWrite(); + instance.clearSignedHeader(); + return this; + } + + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public boolean hasValidatorSet() { + return instance.hasValidatorSet(); + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + @java.lang.Override + public com.tendermint.types.ValidatorSet getValidatorSet() { + return instance.getValidatorSet(); + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder setValidatorSet(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.setValidatorSet(value); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder setValidatorSet( + com.tendermint.types.ValidatorSet.Builder builderForValue) { + copyOnWrite(); + instance.setValidatorSet(builderForValue.build()); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder mergeValidatorSet(com.tendermint.types.ValidatorSet value) { + copyOnWrite(); + instance.mergeValidatorSet(value); + return this; + } + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + */ + public Builder clearValidatorSet() { copyOnWrite(); + instance.clearValidatorSet(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.LightBlock) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.LightBlock(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "signedHeader_", + "validatorSet_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.LightBlock.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.LightBlock) + private static final com.tendermint.types.LightBlock DEFAULT_INSTANCE; + static { + LightBlock defaultInstance = new LightBlock(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + LightBlock.class, defaultInstance); + } + + public static com.tendermint.types.LightBlock getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlockOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlockOrBuilder.java new file mode 100644 index 000000000..c1e3a5b03 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/LightBlockOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface LightBlockOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.LightBlock) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + * @return Whether the signedHeader field is set. + */ + boolean hasSignedHeader(); + /** + * .tendermint.types.SignedHeader signed_header = 1 [json_name = "signedHeader"]; + * @return The signedHeader. + */ + com.tendermint.types.SignedHeader getSignedHeader(); + + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + * @return Whether the validatorSet field is set. + */ + boolean hasValidatorSet(); + /** + * .tendermint.types.ValidatorSet validator_set = 2 [json_name = "validatorSet"]; + * @return The validatorSet. + */ + com.tendermint.types.ValidatorSet getValidatorSet(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Part.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Part.java new file mode 100644 index 000000000..657583ed1 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Part.java @@ -0,0 +1,390 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.Part} + */ +public final class Part extends + com.google.protobuf.GeneratedMessageLite< + Part, Part.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Part) + PartOrBuilder { + private Part() { + bytes_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int INDEX_FIELD_NUMBER = 1; + private int index_; + /** + * uint32 index = 1 [json_name = "index"]; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return index_; + } + /** + * uint32 index = 1 [json_name = "index"]; + * @param value The index to set. + */ + private void setIndex(int value) { + + index_ = value; + } + /** + * uint32 index = 1 [json_name = "index"]; + */ + private void clearIndex() { + + index_ = 0; + } + + public static final int BYTES_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString bytes_; + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @return The bytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBytes() { + return bytes_; + } + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @param value The bytes to set. + */ + private void setBytes(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + bytes_ = value; + } + /** + * bytes bytes = 2 [json_name = "bytes"]; + */ + private void clearBytes() { + + bytes_ = getDefaultInstance().getBytes(); + } + + public static final int PROOF_FIELD_NUMBER = 3; + private com.tendermint.crypto.Proof proof_; + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasProof() { + return proof_ != null; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return proof_ == null ? com.tendermint.crypto.Proof.getDefaultInstance() : proof_; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + private void setProof(com.tendermint.crypto.Proof value) { + value.getClass(); + proof_ = value; + + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeProof(com.tendermint.crypto.Proof value) { + value.getClass(); + if (proof_ != null && + proof_ != com.tendermint.crypto.Proof.getDefaultInstance()) { + proof_ = + com.tendermint.crypto.Proof.newBuilder(proof_).mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + private void clearProof() { proof_ = null; + + } + + public static com.tendermint.types.Part parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Part parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Part parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Part parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Part parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Part parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Part parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Part parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Part parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Part parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Part parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Part parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Part prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.Part} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Part, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Part) + com.tendermint.types.PartOrBuilder { + // Construct using com.tendermint.types.Part.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint32 index = 1 [json_name = "index"]; + * @return The index. + */ + @java.lang.Override + public int getIndex() { + return instance.getIndex(); + } + /** + * uint32 index = 1 [json_name = "index"]; + * @param value The index to set. + * @return This builder for chaining. + */ + public Builder setIndex(int value) { + copyOnWrite(); + instance.setIndex(value); + return this; + } + /** + * uint32 index = 1 [json_name = "index"]; + * @return This builder for chaining. + */ + public Builder clearIndex() { + copyOnWrite(); + instance.clearIndex(); + return this; + } + + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @return The bytes. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBytes() { + return instance.getBytes(); + } + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @param value The bytes to set. + * @return This builder for chaining. + */ + public Builder setBytes(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setBytes(value); + return this; + } + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @return This builder for chaining. + */ + public Builder clearBytes() { + copyOnWrite(); + instance.clearBytes(); + return this; + } + + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasProof() { + return instance.hasProof(); + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return instance.getProof(); + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + public Builder setProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.setProof(value); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + public Builder setProof( + com.tendermint.crypto.Proof.Builder builderForValue) { + copyOnWrite(); + instance.setProof(builderForValue.build()); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + public Builder mergeProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.mergeProof(value); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + */ + public Builder clearProof() { copyOnWrite(); + instance.clearProof(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Part) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Part(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "index_", + "bytes_", + "proof_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\u000b\u0002\n" + + "\u0003\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Part.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Part) + private static final com.tendermint.types.Part DEFAULT_INSTANCE; + static { + Part defaultInstance = new Part(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Part.class, defaultInstance); + } + + public static com.tendermint.types.Part getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartOrBuilder.java new file mode 100644 index 000000000..c787ee413 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface PartOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Part) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint32 index = 1 [json_name = "index"]; + * @return The index. + */ + int getIndex(); + + /** + * bytes bytes = 2 [json_name = "bytes"]; + * @return The bytes. + */ + com.google.protobuf.ByteString getBytes(); + + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + * @return Whether the proof field is set. + */ + boolean hasProof(); + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof", (.gogoproto.nullable) = false]; + * @return The proof. + */ + com.tendermint.crypto.Proof getProof(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeader.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeader.java new file mode 100644 index 000000000..9c0c57197 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeader.java @@ -0,0 +1,304 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * PartsetHeader
+ * 
+ * + * Protobuf type {@code tendermint.types.PartSetHeader} + */ +public final class PartSetHeader extends + com.google.protobuf.GeneratedMessageLite< + PartSetHeader, PartSetHeader.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.PartSetHeader) + PartSetHeaderOrBuilder { + private PartSetHeader() { + hash_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int TOTAL_FIELD_NUMBER = 1; + private int total_; + /** + * uint32 total = 1 [json_name = "total"]; + * @return The total. + */ + @java.lang.Override + public int getTotal() { + return total_; + } + /** + * uint32 total = 1 [json_name = "total"]; + * @param value The total to set. + */ + private void setTotal(int value) { + + total_ = value; + } + /** + * uint32 total = 1 [json_name = "total"]; + */ + private void clearTotal() { + + total_ = 0; + } + + public static final int HASH_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString hash_; + /** + * bytes hash = 2 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return hash_; + } + /** + * bytes hash = 2 [json_name = "hash"]; + * @param value The hash to set. + */ + private void setHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + hash_ = value; + } + /** + * bytes hash = 2 [json_name = "hash"]; + */ + private void clearHash() { + + hash_ = getDefaultInstance().getHash(); + } + + public static com.tendermint.types.PartSetHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.PartSetHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.PartSetHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.PartSetHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.PartSetHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.PartSetHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.PartSetHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.PartSetHeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.PartSetHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.PartSetHeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.PartSetHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.PartSetHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.PartSetHeader prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * PartsetHeader
+   * 
+ * + * Protobuf type {@code tendermint.types.PartSetHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.PartSetHeader, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.PartSetHeader) + com.tendermint.types.PartSetHeaderOrBuilder { + // Construct using com.tendermint.types.PartSetHeader.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint32 total = 1 [json_name = "total"]; + * @return The total. + */ + @java.lang.Override + public int getTotal() { + return instance.getTotal(); + } + /** + * uint32 total = 1 [json_name = "total"]; + * @param value The total to set. + * @return This builder for chaining. + */ + public Builder setTotal(int value) { + copyOnWrite(); + instance.setTotal(value); + return this; + } + /** + * uint32 total = 1 [json_name = "total"]; + * @return This builder for chaining. + */ + public Builder clearTotal() { + copyOnWrite(); + instance.clearTotal(); + return this; + } + + /** + * bytes hash = 2 [json_name = "hash"]; + * @return The hash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getHash() { + return instance.getHash(); + } + /** + * bytes hash = 2 [json_name = "hash"]; + * @param value The hash to set. + * @return This builder for chaining. + */ + public Builder setHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setHash(value); + return this; + } + /** + * bytes hash = 2 [json_name = "hash"]; + * @return This builder for chaining. + */ + public Builder clearHash() { + copyOnWrite(); + instance.clearHash(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.PartSetHeader) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.PartSetHeader(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "total_", + "hash_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u000b\u0002\n" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.PartSetHeader.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.PartSetHeader) + private static final com.tendermint.types.PartSetHeader DEFAULT_INSTANCE; + static { + PartSetHeader defaultInstance = new PartSetHeader(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + PartSetHeader.class, defaultInstance); + } + + public static com.tendermint.types.PartSetHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeaderOrBuilder.java new file mode 100644 index 000000000..b0e3342c7 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/PartSetHeaderOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface PartSetHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.PartSetHeader) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint32 total = 1 [json_name = "total"]; + * @return The total. + */ + int getTotal(); + + /** + * bytes hash = 2 [json_name = "hash"]; + * @return The hash. + */ + com.google.protobuf.ByteString getHash(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Proposal.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Proposal.java new file mode 100644 index 000000000..59a6709f8 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Proposal.java @@ -0,0 +1,683 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.Proposal} + */ +public final class Proposal extends + com.google.protobuf.GeneratedMessageLite< + Proposal, Proposal.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Proposal) + ProposalOrBuilder { + private Proposal() { + signature_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.tendermint.types.SignedMsgType getType() { + com.tendermint.types.SignedMsgType result = com.tendermint.types.SignedMsgType.forNumber(type_); + return result == null ? com.tendermint.types.SignedMsgType.UNRECOGNIZED : result; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + */ + private void setTypeValue(int value) { + type_ = value; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The type to set. + */ + private void setType(com.tendermint.types.SignedMsgType value) { + type_ = value.getNumber(); + + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + */ + private void clearType() { + + type_ = 0; + } + + public static final int HEIGHT_FIELD_NUMBER = 2; + private long height_; + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * int64 height = 2 [json_name = "height"]; + * @param value The height to set. + */ + private void setHeight(long value) { + + height_ = value; + } + /** + * int64 height = 2 [json_name = "height"]; + */ + private void clearHeight() { + + height_ = 0L; + } + + public static final int ROUND_FIELD_NUMBER = 3; + private int round_; + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + * int32 round = 3 [json_name = "round"]; + * @param value The round to set. + */ + private void setRound(int value) { + + round_ = value; + } + /** + * int32 round = 3 [json_name = "round"]; + */ + private void clearRound() { + + round_ = 0; + } + + public static final int POL_ROUND_FIELD_NUMBER = 4; + private int polRound_; + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @return The polRound. + */ + @java.lang.Override + public int getPolRound() { + return polRound_; + } + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @param value The polRound to set. + */ + private void setPolRound(int value) { + + polRound_ = value; + } + /** + * int32 pol_round = 4 [json_name = "polRound"]; + */ + private void clearPolRound() { + + polRound_ = 0; + } + + public static final int BLOCK_ID_FIELD_NUMBER = 5; + private com.tendermint.types.BlockID blockId_; + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return blockId_ != null; + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return blockId_ == null ? com.tendermint.types.BlockID.getDefaultInstance() : blockId_; + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void setBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + blockId_ = value; + + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + if (blockId_ != null && + blockId_ != com.tendermint.types.BlockID.getDefaultInstance()) { + blockId_ = + com.tendermint.types.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); + } else { + blockId_ = value; + } + + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void clearBlockId() { blockId_ = null; + + } + + public static final int TIMESTAMP_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp timestamp_; + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void setTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + timestamp_ = value; + + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + if (timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void clearTimestamp() { timestamp_ = null; + + } + + public static final int SIGNATURE_FIELD_NUMBER = 7; + private com.google.protobuf.ByteString signature_; + /** + * bytes signature = 7 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + * bytes signature = 7 [json_name = "signature"]; + * @param value The signature to set. + */ + private void setSignature(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + signature_ = value; + } + /** + * bytes signature = 7 [json_name = "signature"]; + */ + private void clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + } + + public static com.tendermint.types.Proposal parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Proposal parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Proposal parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Proposal parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Proposal parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Proposal parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Proposal parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Proposal parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Proposal parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Proposal parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Proposal parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Proposal parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Proposal prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.Proposal} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Proposal, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Proposal) + com.tendermint.types.ProposalOrBuilder { + // Construct using com.tendermint.types.Proposal.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return instance.getTypeValue(); + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + copyOnWrite(); + instance.setTypeValue(value); + return this; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.tendermint.types.SignedMsgType getType() { + return instance.getType(); + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setType(com.tendermint.types.SignedMsgType value) { + copyOnWrite(); + instance.setType(value); + return this; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + copyOnWrite(); + instance.clearType(); + return this; + } + + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return instance.getHeight(); + } + /** + * int64 height = 2 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + * int64 height = 2 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return instance.getRound(); + } + /** + * int32 round = 3 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + copyOnWrite(); + instance.setRound(value); + return this; + } + /** + * int32 round = 3 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + copyOnWrite(); + instance.clearRound(); + return this; + } + + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @return The polRound. + */ + @java.lang.Override + public int getPolRound() { + return instance.getPolRound(); + } + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @param value The polRound to set. + * @return This builder for chaining. + */ + public Builder setPolRound(int value) { + copyOnWrite(); + instance.setPolRound(value); + return this; + } + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @return This builder for chaining. + */ + public Builder clearPolRound() { + copyOnWrite(); + instance.clearPolRound(); + return this; + } + + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return instance.hasBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return instance.getBlockId(); + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.setBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId( + com.tendermint.types.BlockID.Builder builderForValue) { + copyOnWrite(); + instance.setBlockId(builderForValue.build()); + return this; + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder mergeBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.mergeBlockId(value); + return this; + } + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder clearBlockId() { copyOnWrite(); + instance.clearBlockId(); + return this; + } + + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return instance.hasTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return instance.getTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTimestamp(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder clearTimestamp() { copyOnWrite(); + instance.clearTimestamp(); + return this; + } + + /** + * bytes signature = 7 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return instance.getSignature(); + } + /** + * bytes signature = 7 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSignature(value); + return this; + } + /** + * bytes signature = 7 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + copyOnWrite(); + instance.clearSignature(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Proposal) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Proposal(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "type_", + "height_", + "round_", + "polRound_", + "blockId_", + "timestamp_", + "signature_", + }; + java.lang.String info = + "\u0000\u0007\u0000\u0000\u0001\u0007\u0007\u0000\u0000\u0000\u0001\f\u0002\u0002" + + "\u0003\u0004\u0004\u0004\u0005\t\u0006\t\u0007\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Proposal.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Proposal) + private static final com.tendermint.types.Proposal DEFAULT_INSTANCE; + static { + Proposal defaultInstance = new Proposal(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Proposal.class, defaultInstance); + } + + public static com.tendermint.types.Proposal getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ProposalOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ProposalOrBuilder.java new file mode 100644 index 000000000..678588e5d --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ProposalOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface ProposalOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Proposal) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + com.tendermint.types.SignedMsgType getType(); + + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + long getHeight(); + + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + * int32 pol_round = 4 [json_name = "polRound"]; + * @return The polRound. + */ + int getPolRound(); + + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return Whether the blockId field is set. + */ + boolean hasBlockId(); + /** + * .tendermint.types.BlockID block_id = 5 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return The blockId. + */ + com.tendermint.types.BlockID getBlockId(); + + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * .google.protobuf.Timestamp timestamp = 6 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + * bytes signature = 7 [json_name = "signature"]; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeader.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeader.java new file mode 100644 index 000000000..88be5e2d0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeader.java @@ -0,0 +1,371 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.SignedHeader} + */ +public final class SignedHeader extends + com.google.protobuf.GeneratedMessageLite< + SignedHeader, SignedHeader.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.SignedHeader) + SignedHeaderOrBuilder { + private SignedHeader() { + } + public static final int HEADER_FIELD_NUMBER = 1; + private com.tendermint.types.Header header_; + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return header_ != null; + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.tendermint.types.Header getHeader() { + return header_ == null ? com.tendermint.types.Header.getDefaultInstance() : header_; + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + private void setHeader(com.tendermint.types.Header value) { + value.getClass(); + header_ = value; + + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeHeader(com.tendermint.types.Header value) { + value.getClass(); + if (header_ != null && + header_ != com.tendermint.types.Header.getDefaultInstance()) { + header_ = + com.tendermint.types.Header.newBuilder(header_).mergeFrom(value).buildPartial(); + } else { + header_ = value; + } + + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + private void clearHeader() { header_ = null; + + } + + public static final int COMMIT_FIELD_NUMBER = 2; + private com.tendermint.types.Commit commit_; + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + @java.lang.Override + public boolean hasCommit() { + return commit_ != null; + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + @java.lang.Override + public com.tendermint.types.Commit getCommit() { + return commit_ == null ? com.tendermint.types.Commit.getDefaultInstance() : commit_; + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + private void setCommit(com.tendermint.types.Commit value) { + value.getClass(); + commit_ = value; + + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeCommit(com.tendermint.types.Commit value) { + value.getClass(); + if (commit_ != null && + commit_ != com.tendermint.types.Commit.getDefaultInstance()) { + commit_ = + com.tendermint.types.Commit.newBuilder(commit_).mergeFrom(value).buildPartial(); + } else { + commit_ = value; + } + + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + private void clearCommit() { commit_ = null; + + } + + public static com.tendermint.types.SignedHeader parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SignedHeader parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SignedHeader parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SignedHeader parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SignedHeader parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SignedHeader parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SignedHeader parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SignedHeader parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.SignedHeader parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SignedHeader parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.SignedHeader parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SignedHeader parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.SignedHeader prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.SignedHeader} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.SignedHeader, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.SignedHeader) + com.tendermint.types.SignedHeaderOrBuilder { + // Construct using com.tendermint.types.SignedHeader.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + @java.lang.Override + public boolean hasHeader() { + return instance.hasHeader(); + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + @java.lang.Override + public com.tendermint.types.Header getHeader() { + return instance.getHeader(); + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + public Builder setHeader(com.tendermint.types.Header value) { + copyOnWrite(); + instance.setHeader(value); + return this; + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + public Builder setHeader( + com.tendermint.types.Header.Builder builderForValue) { + copyOnWrite(); + instance.setHeader(builderForValue.build()); + return this; + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + public Builder mergeHeader(com.tendermint.types.Header value) { + copyOnWrite(); + instance.mergeHeader(value); + return this; + } + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + */ + public Builder clearHeader() { copyOnWrite(); + instance.clearHeader(); + return this; + } + + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + @java.lang.Override + public boolean hasCommit() { + return instance.hasCommit(); + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + @java.lang.Override + public com.tendermint.types.Commit getCommit() { + return instance.getCommit(); + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + public Builder setCommit(com.tendermint.types.Commit value) { + copyOnWrite(); + instance.setCommit(value); + return this; + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + public Builder setCommit( + com.tendermint.types.Commit.Builder builderForValue) { + copyOnWrite(); + instance.setCommit(builderForValue.build()); + return this; + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + public Builder mergeCommit(com.tendermint.types.Commit value) { + copyOnWrite(); + instance.mergeCommit(value); + return this; + } + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + */ + public Builder clearCommit() { copyOnWrite(); + instance.clearCommit(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.SignedHeader) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.SignedHeader(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "header_", + "commit_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.SignedHeader.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.SignedHeader) + private static final com.tendermint.types.SignedHeader DEFAULT_INSTANCE; + static { + SignedHeader defaultInstance = new SignedHeader(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SignedHeader.class, defaultInstance); + } + + public static com.tendermint.types.SignedHeader getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeaderOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeaderOrBuilder.java new file mode 100644 index 000000000..4f8a6a3e1 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedHeaderOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface SignedHeaderOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.SignedHeader) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + * @return Whether the header field is set. + */ + boolean hasHeader(); + /** + * .tendermint.types.Header header = 1 [json_name = "header"]; + * @return The header. + */ + com.tendermint.types.Header getHeader(); + + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + * @return Whether the commit field is set. + */ + boolean hasCommit(); + /** + * .tendermint.types.Commit commit = 2 [json_name = "commit"]; + * @return The commit. + */ + com.tendermint.types.Commit getCommit(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedMsgType.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedMsgType.java new file mode 100644 index 000000000..95d266c4b --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SignedMsgType.java @@ -0,0 +1,132 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * SignedMsgType is a type of signed message in the consensus.
+ * 
+ * + * Protobuf enum {@code tendermint.types.SignedMsgType} + */ +public enum SignedMsgType + implements com.google.protobuf.Internal.EnumLite { + /** + * SIGNED_MSG_TYPE_UNKNOWN = 0 [(.gogoproto.enumvalue_customname) = "UnknownType"]; + */ + SIGNED_MSG_TYPE_UNKNOWN(0), + /** + *
+   * Votes
+   * 
+ * + * SIGNED_MSG_TYPE_PREVOTE = 1 [(.gogoproto.enumvalue_customname) = "PrevoteType"]; + */ + SIGNED_MSG_TYPE_PREVOTE(1), + /** + * SIGNED_MSG_TYPE_PRECOMMIT = 2 [(.gogoproto.enumvalue_customname) = "PrecommitType"]; + */ + SIGNED_MSG_TYPE_PRECOMMIT(2), + /** + *
+   * Proposals
+   * 
+ * + * SIGNED_MSG_TYPE_PROPOSAL = 32 [(.gogoproto.enumvalue_customname) = "ProposalType"]; + */ + SIGNED_MSG_TYPE_PROPOSAL(32), + UNRECOGNIZED(-1), + ; + + /** + * SIGNED_MSG_TYPE_UNKNOWN = 0 [(.gogoproto.enumvalue_customname) = "UnknownType"]; + */ + public static final int SIGNED_MSG_TYPE_UNKNOWN_VALUE = 0; + /** + *
+   * Votes
+   * 
+ * + * SIGNED_MSG_TYPE_PREVOTE = 1 [(.gogoproto.enumvalue_customname) = "PrevoteType"]; + */ + public static final int SIGNED_MSG_TYPE_PREVOTE_VALUE = 1; + /** + * SIGNED_MSG_TYPE_PRECOMMIT = 2 [(.gogoproto.enumvalue_customname) = "PrecommitType"]; + */ + public static final int SIGNED_MSG_TYPE_PRECOMMIT_VALUE = 2; + /** + *
+   * Proposals
+   * 
+ * + * SIGNED_MSG_TYPE_PROPOSAL = 32 [(.gogoproto.enumvalue_customname) = "ProposalType"]; + */ + public static final int SIGNED_MSG_TYPE_PROPOSAL_VALUE = 32; + + + @java.lang.Override + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SignedMsgType valueOf(int value) { + return forNumber(value); + } + + public static SignedMsgType forNumber(int value) { + switch (value) { + case 0: return SIGNED_MSG_TYPE_UNKNOWN; + case 1: return SIGNED_MSG_TYPE_PREVOTE; + case 2: return SIGNED_MSG_TYPE_PRECOMMIT; + case 32: return SIGNED_MSG_TYPE_PROPOSAL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + SignedMsgType> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + @java.lang.Override + public SignedMsgType findValueByNumber(int number) { + return SignedMsgType.forNumber(number); + } + }; + + public static com.google.protobuf.Internal.EnumVerifier + internalGetVerifier() { + return SignedMsgTypeVerifier.INSTANCE; + } + + private static final class SignedMsgTypeVerifier implements + com.google.protobuf.Internal.EnumVerifier { + static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new SignedMsgTypeVerifier(); + @java.lang.Override + public boolean isInRange(int number) { + return SignedMsgType.forNumber(number) != null; + } + }; + + private final int value; + + private SignedMsgType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:tendermint.types.SignedMsgType) +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidator.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidator.java new file mode 100644 index 000000000..f6506aa6c --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidator.java @@ -0,0 +1,333 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.SimpleValidator} + */ +public final class SimpleValidator extends + com.google.protobuf.GeneratedMessageLite< + SimpleValidator, SimpleValidator.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.SimpleValidator) + SimpleValidatorOrBuilder { + private SimpleValidator() { + } + public static final int PUB_KEY_FIELD_NUMBER = 1; + private com.tendermint.crypto.PublicKey pubKey_; + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + @java.lang.Override + public boolean hasPubKey() { + return pubKey_ != null; + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + @java.lang.Override + public com.tendermint.crypto.PublicKey getPubKey() { + return pubKey_ == null ? com.tendermint.crypto.PublicKey.getDefaultInstance() : pubKey_; + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + private void setPubKey(com.tendermint.crypto.PublicKey value) { + value.getClass(); + pubKey_ = value; + + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePubKey(com.tendermint.crypto.PublicKey value) { + value.getClass(); + if (pubKey_ != null && + pubKey_ != com.tendermint.crypto.PublicKey.getDefaultInstance()) { + pubKey_ = + com.tendermint.crypto.PublicKey.newBuilder(pubKey_).mergeFrom(value).buildPartial(); + } else { + pubKey_ = value; + } + + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + private void clearPubKey() { pubKey_ = null; + + } + + public static final int VOTING_POWER_FIELD_NUMBER = 2; + private long votingPower_; + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @return The votingPower. + */ + @java.lang.Override + public long getVotingPower() { + return votingPower_; + } + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @param value The votingPower to set. + */ + private void setVotingPower(long value) { + + votingPower_ = value; + } + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + */ + private void clearVotingPower() { + + votingPower_ = 0L; + } + + public static com.tendermint.types.SimpleValidator parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SimpleValidator parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SimpleValidator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SimpleValidator parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SimpleValidator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.SimpleValidator parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.SimpleValidator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SimpleValidator parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.SimpleValidator parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SimpleValidator parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.SimpleValidator parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.SimpleValidator parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.SimpleValidator prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.SimpleValidator} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.SimpleValidator, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.SimpleValidator) + com.tendermint.types.SimpleValidatorOrBuilder { + // Construct using com.tendermint.types.SimpleValidator.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + @java.lang.Override + public boolean hasPubKey() { + return instance.hasPubKey(); + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + @java.lang.Override + public com.tendermint.crypto.PublicKey getPubKey() { + return instance.getPubKey(); + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + public Builder setPubKey(com.tendermint.crypto.PublicKey value) { + copyOnWrite(); + instance.setPubKey(value); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + public Builder setPubKey( + com.tendermint.crypto.PublicKey.Builder builderForValue) { + copyOnWrite(); + instance.setPubKey(builderForValue.build()); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + public Builder mergePubKey(com.tendermint.crypto.PublicKey value) { + copyOnWrite(); + instance.mergePubKey(value); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + */ + public Builder clearPubKey() { copyOnWrite(); + instance.clearPubKey(); + return this; + } + + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @return The votingPower. + */ + @java.lang.Override + public long getVotingPower() { + return instance.getVotingPower(); + } + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @param value The votingPower to set. + * @return This builder for chaining. + */ + public Builder setVotingPower(long value) { + copyOnWrite(); + instance.setVotingPower(value); + return this; + } + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @return This builder for chaining. + */ + public Builder clearVotingPower() { + copyOnWrite(); + instance.clearVotingPower(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.SimpleValidator) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.SimpleValidator(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "pubKey_", + "votingPower_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\t\u0002\u0002" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.SimpleValidator.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.SimpleValidator) + private static final com.tendermint.types.SimpleValidator DEFAULT_INSTANCE; + static { + SimpleValidator defaultInstance = new SimpleValidator(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + SimpleValidator.class, defaultInstance); + } + + public static com.tendermint.types.SimpleValidator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidatorOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidatorOrBuilder.java new file mode 100644 index 000000000..8d6a3ba0a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/SimpleValidatorOrBuilder.java @@ -0,0 +1,26 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +public interface SimpleValidatorOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.SimpleValidator) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + * @return Whether the pubKey field is set. + */ + boolean hasPubKey(); + /** + * .tendermint.crypto.PublicKey pub_key = 1 [json_name = "pubKey"]; + * @return The pubKey. + */ + com.tendermint.crypto.PublicKey getPubKey(); + + /** + * int64 voting_power = 2 [json_name = "votingPower"]; + * @return The votingPower. + */ + long getVotingPower(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProof.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProof.java new file mode 100644 index 000000000..401778516 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProof.java @@ -0,0 +1,400 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
+ * 
+ * + * Protobuf type {@code tendermint.types.TxProof} + */ +public final class TxProof extends + com.google.protobuf.GeneratedMessageLite< + TxProof, TxProof.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.TxProof) + TxProofOrBuilder { + private TxProof() { + rootHash_ = com.google.protobuf.ByteString.EMPTY; + data_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int ROOT_HASH_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString rootHash_; + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @return The rootHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRootHash() { + return rootHash_; + } + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @param value The rootHash to set. + */ + private void setRootHash(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + rootHash_ = value; + } + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + */ + private void clearRootHash() { + + rootHash_ = getDefaultInstance().getRootHash(); + } + + public static final int DATA_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString data_; + /** + * bytes data = 2 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return data_; + } + /** + * bytes data = 2 [json_name = "data"]; + * @param value The data to set. + */ + private void setData(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + data_ = value; + } + /** + * bytes data = 2 [json_name = "data"]; + */ + private void clearData() { + + data_ = getDefaultInstance().getData(); + } + + public static final int PROOF_FIELD_NUMBER = 3; + private com.tendermint.crypto.Proof proof_; + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + @java.lang.Override + public boolean hasProof() { + return proof_ != null; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return proof_ == null ? com.tendermint.crypto.Proof.getDefaultInstance() : proof_; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + private void setProof(com.tendermint.crypto.Proof value) { + value.getClass(); + proof_ = value; + + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeProof(com.tendermint.crypto.Proof value) { + value.getClass(); + if (proof_ != null && + proof_ != com.tendermint.crypto.Proof.getDefaultInstance()) { + proof_ = + com.tendermint.crypto.Proof.newBuilder(proof_).mergeFrom(value).buildPartial(); + } else { + proof_ = value; + } + + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + private void clearProof() { proof_ = null; + + } + + public static com.tendermint.types.TxProof parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.TxProof parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.TxProof parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.TxProof parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.TxProof parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.TxProof parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.TxProof parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.TxProof parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.TxProof parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.TxProof parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.TxProof parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.TxProof parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.TxProof prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree.
+   * 
+ * + * Protobuf type {@code tendermint.types.TxProof} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.TxProof, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.TxProof) + com.tendermint.types.TxProofOrBuilder { + // Construct using com.tendermint.types.TxProof.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @return The rootHash. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRootHash() { + return instance.getRootHash(); + } + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @param value The rootHash to set. + * @return This builder for chaining. + */ + public Builder setRootHash(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setRootHash(value); + return this; + } + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @return This builder for chaining. + */ + public Builder clearRootHash() { + copyOnWrite(); + instance.clearRootHash(); + return this; + } + + /** + * bytes data = 2 [json_name = "data"]; + * @return The data. + */ + @java.lang.Override + public com.google.protobuf.ByteString getData() { + return instance.getData(); + } + /** + * bytes data = 2 [json_name = "data"]; + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setData(value); + return this; + } + /** + * bytes data = 2 [json_name = "data"]; + * @return This builder for chaining. + */ + public Builder clearData() { + copyOnWrite(); + instance.clearData(); + return this; + } + + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + @java.lang.Override + public boolean hasProof() { + return instance.hasProof(); + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + @java.lang.Override + public com.tendermint.crypto.Proof getProof() { + return instance.getProof(); + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + public Builder setProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.setProof(value); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + public Builder setProof( + com.tendermint.crypto.Proof.Builder builderForValue) { + copyOnWrite(); + instance.setProof(builderForValue.build()); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + public Builder mergeProof(com.tendermint.crypto.Proof value) { + copyOnWrite(); + instance.mergeProof(value); + return this; + } + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + */ + public Builder clearProof() { copyOnWrite(); + instance.clearProof(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.TxProof) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.TxProof(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "rootHash_", + "data_", + "proof_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0000\u0000\u0001\n\u0002\n\u0003" + + "\t"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.TxProof.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.TxProof) + private static final com.tendermint.types.TxProof DEFAULT_INSTANCE; + static { + TxProof defaultInstance = new TxProof(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + TxProof.class, defaultInstance); + } + + public static com.tendermint.types.TxProof getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProofOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProofOrBuilder.java new file mode 100644 index 000000000..29ec00b80 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TxProofOrBuilder.java @@ -0,0 +1,32 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface TxProofOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.TxProof) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes root_hash = 1 [json_name = "rootHash"]; + * @return The rootHash. + */ + com.google.protobuf.ByteString getRootHash(); + + /** + * bytes data = 2 [json_name = "data"]; + * @return The data. + */ + com.google.protobuf.ByteString getData(); + + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + * @return Whether the proof field is set. + */ + boolean hasProof(); + /** + * .tendermint.crypto.Proof proof = 3 [json_name = "proof"]; + * @return The proof. + */ + com.tendermint.crypto.Proof getProof(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TypesProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TypesProto.java new file mode 100644 index 000000000..1ede31fd4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/TypesProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public final class TypesProto { + private TypesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Validator.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Validator.java new file mode 100644 index 000000000..68c391ea0 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Validator.java @@ -0,0 +1,445 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.Validator} + */ +public final class Validator extends + com.google.protobuf.GeneratedMessageLite< + Validator, Validator.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Validator) + ValidatorOrBuilder { + private Validator() { + address_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int ADDRESS_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString address_; + /** + * bytes address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddress() { + return address_; + } + /** + * bytes address = 1 [json_name = "address"]; + * @param value The address to set. + */ + private void setAddress(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + address_ = value; + } + /** + * bytes address = 1 [json_name = "address"]; + */ + private void clearAddress() { + + address_ = getDefaultInstance().getAddress(); + } + + public static final int PUB_KEY_FIELD_NUMBER = 2; + private com.tendermint.crypto.PublicKey pubKey_; + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPubKey() { + return pubKey_ != null; + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.PublicKey getPubKey() { + return pubKey_ == null ? com.tendermint.crypto.PublicKey.getDefaultInstance() : pubKey_; + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + private void setPubKey(com.tendermint.crypto.PublicKey value) { + value.getClass(); + pubKey_ = value; + + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergePubKey(com.tendermint.crypto.PublicKey value) { + value.getClass(); + if (pubKey_ != null && + pubKey_ != com.tendermint.crypto.PublicKey.getDefaultInstance()) { + pubKey_ = + com.tendermint.crypto.PublicKey.newBuilder(pubKey_).mergeFrom(value).buildPartial(); + } else { + pubKey_ = value; + } + + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + private void clearPubKey() { pubKey_ = null; + + } + + public static final int VOTING_POWER_FIELD_NUMBER = 3; + private long votingPower_; + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @return The votingPower. + */ + @java.lang.Override + public long getVotingPower() { + return votingPower_; + } + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @param value The votingPower to set. + */ + private void setVotingPower(long value) { + + votingPower_ = value; + } + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + */ + private void clearVotingPower() { + + votingPower_ = 0L; + } + + public static final int PROPOSER_PRIORITY_FIELD_NUMBER = 4; + private long proposerPriority_; + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @return The proposerPriority. + */ + @java.lang.Override + public long getProposerPriority() { + return proposerPriority_; + } + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @param value The proposerPriority to set. + */ + private void setProposerPriority(long value) { + + proposerPriority_ = value; + } + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + */ + private void clearProposerPriority() { + + proposerPriority_ = 0L; + } + + public static com.tendermint.types.Validator parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Validator parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Validator parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Validator parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Validator parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Validator parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Validator parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Validator parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Validator parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Validator parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Validator parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Validator parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Validator prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.Validator} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Validator, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Validator) + com.tendermint.types.ValidatorOrBuilder { + // Construct using com.tendermint.types.Validator.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * bytes address = 1 [json_name = "address"]; + * @return The address. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAddress() { + return instance.getAddress(); + } + /** + * bytes address = 1 [json_name = "address"]; + * @param value The address to set. + * @return This builder for chaining. + */ + public Builder setAddress(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setAddress(value); + return this; + } + /** + * bytes address = 1 [json_name = "address"]; + * @return This builder for chaining. + */ + public Builder clearAddress() { + copyOnWrite(); + instance.clearAddress(); + return this; + } + + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public boolean hasPubKey() { + return instance.hasPubKey(); + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + @java.lang.Override + public com.tendermint.crypto.PublicKey getPubKey() { + return instance.getPubKey(); + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + public Builder setPubKey(com.tendermint.crypto.PublicKey value) { + copyOnWrite(); + instance.setPubKey(value); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + public Builder setPubKey( + com.tendermint.crypto.PublicKey.Builder builderForValue) { + copyOnWrite(); + instance.setPubKey(builderForValue.build()); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + public Builder mergePubKey(com.tendermint.crypto.PublicKey value) { + copyOnWrite(); + instance.mergePubKey(value); + return this; + } + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + */ + public Builder clearPubKey() { copyOnWrite(); + instance.clearPubKey(); + return this; + } + + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @return The votingPower. + */ + @java.lang.Override + public long getVotingPower() { + return instance.getVotingPower(); + } + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @param value The votingPower to set. + * @return This builder for chaining. + */ + public Builder setVotingPower(long value) { + copyOnWrite(); + instance.setVotingPower(value); + return this; + } + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @return This builder for chaining. + */ + public Builder clearVotingPower() { + copyOnWrite(); + instance.clearVotingPower(); + return this; + } + + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @return The proposerPriority. + */ + @java.lang.Override + public long getProposerPriority() { + return instance.getProposerPriority(); + } + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @param value The proposerPriority to set. + * @return This builder for chaining. + */ + public Builder setProposerPriority(long value) { + copyOnWrite(); + instance.setProposerPriority(value); + return this; + } + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @return This builder for chaining. + */ + public Builder clearProposerPriority() { + copyOnWrite(); + instance.clearProposerPriority(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Validator) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Validator(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "address_", + "pubKey_", + "votingPower_", + "proposerPriority_", + }; + java.lang.String info = + "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\n\u0002\t\u0003" + + "\u0002\u0004\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Validator.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Validator) + private static final com.tendermint.types.Validator DEFAULT_INSTANCE; + static { + Validator defaultInstance = new Validator(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Validator.class, defaultInstance); + } + + public static com.tendermint.types.Validator getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorOrBuilder.java new file mode 100644 index 000000000..0b3dde38a --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorOrBuilder.java @@ -0,0 +1,38 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +public interface ValidatorOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Validator) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * bytes address = 1 [json_name = "address"]; + * @return The address. + */ + com.google.protobuf.ByteString getAddress(); + + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + * @return Whether the pubKey field is set. + */ + boolean hasPubKey(); + /** + * .tendermint.crypto.PublicKey pub_key = 2 [json_name = "pubKey", (.gogoproto.nullable) = false]; + * @return The pubKey. + */ + com.tendermint.crypto.PublicKey getPubKey(); + + /** + * int64 voting_power = 3 [json_name = "votingPower"]; + * @return The votingPower. + */ + long getVotingPower(); + + /** + * int64 proposer_priority = 4 [json_name = "proposerPriority"]; + * @return The proposerPriority. + */ + long getProposerPriority(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorProto.java new file mode 100644 index 000000000..2ef541f33 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +public final class ValidatorProto { + private ValidatorProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSet.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSet.java new file mode 100644 index 000000000..2e31e3dde --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSet.java @@ -0,0 +1,532 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +/** + * Protobuf type {@code tendermint.types.ValidatorSet} + */ +public final class ValidatorSet extends + com.google.protobuf.GeneratedMessageLite< + ValidatorSet, ValidatorSet.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.ValidatorSet) + ValidatorSetOrBuilder { + private ValidatorSet() { + validators_ = emptyProtobufList(); + } + public static final int VALIDATORS_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.ProtobufList validators_; + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public java.util.List getValidatorsList() { + return validators_; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public java.util.List + getValidatorsOrBuilderList() { + return validators_; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public int getValidatorsCount() { + return validators_.size(); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public com.tendermint.types.Validator getValidators(int index) { + return validators_.get(index); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public com.tendermint.types.ValidatorOrBuilder getValidatorsOrBuilder( + int index) { + return validators_.get(index); + } + private void ensureValidatorsIsMutable() { + com.google.protobuf.Internal.ProtobufList tmp = validators_; + if (!tmp.isModifiable()) { + validators_ = + com.google.protobuf.GeneratedMessageLite.mutableCopy(tmp); + } + } + + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void setValidators( + int index, com.tendermint.types.Validator value) { + value.getClass(); + ensureValidatorsIsMutable(); + validators_.set(index, value); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void addValidators(com.tendermint.types.Validator value) { + value.getClass(); + ensureValidatorsIsMutable(); + validators_.add(value); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void addValidators( + int index, com.tendermint.types.Validator value) { + value.getClass(); + ensureValidatorsIsMutable(); + validators_.add(index, value); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void addAllValidators( + java.lang.Iterable values) { + ensureValidatorsIsMutable(); + com.google.protobuf.AbstractMessageLite.addAll( + values, validators_); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void clearValidators() { + validators_ = emptyProtobufList(); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + private void removeValidators(int index) { + ensureValidatorsIsMutable(); + validators_.remove(index); + } + + public static final int PROPOSER_FIELD_NUMBER = 2; + private com.tendermint.types.Validator proposer_; + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + @java.lang.Override + public boolean hasProposer() { + return proposer_ != null; + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + @java.lang.Override + public com.tendermint.types.Validator getProposer() { + return proposer_ == null ? com.tendermint.types.Validator.getDefaultInstance() : proposer_; + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + private void setProposer(com.tendermint.types.Validator value) { + value.getClass(); + proposer_ = value; + + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeProposer(com.tendermint.types.Validator value) { + value.getClass(); + if (proposer_ != null && + proposer_ != com.tendermint.types.Validator.getDefaultInstance()) { + proposer_ = + com.tendermint.types.Validator.newBuilder(proposer_).mergeFrom(value).buildPartial(); + } else { + proposer_ = value; + } + + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + private void clearProposer() { proposer_ = null; + + } + + public static final int TOTAL_VOTING_POWER_FIELD_NUMBER = 3; + private long totalVotingPower_; + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @return The totalVotingPower. + */ + @java.lang.Override + public long getTotalVotingPower() { + return totalVotingPower_; + } + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @param value The totalVotingPower to set. + */ + private void setTotalVotingPower(long value) { + + totalVotingPower_ = value; + } + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + */ + private void clearTotalVotingPower() { + + totalVotingPower_ = 0L; + } + + public static com.tendermint.types.ValidatorSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.ValidatorSet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.ValidatorSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.ValidatorSet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.ValidatorSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.ValidatorSet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.ValidatorSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.ValidatorSet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.ValidatorSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.ValidatorSet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.ValidatorSet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.ValidatorSet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.ValidatorSet prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + * Protobuf type {@code tendermint.types.ValidatorSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.ValidatorSet, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.ValidatorSet) + com.tendermint.types.ValidatorSetOrBuilder { + // Construct using com.tendermint.types.ValidatorSet.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public java.util.List getValidatorsList() { + return java.util.Collections.unmodifiableList( + instance.getValidatorsList()); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public int getValidatorsCount() { + return instance.getValidatorsCount(); + }/** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + @java.lang.Override + public com.tendermint.types.Validator getValidators(int index) { + return instance.getValidators(index); + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder setValidators( + int index, com.tendermint.types.Validator value) { + copyOnWrite(); + instance.setValidators(index, value); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder setValidators( + int index, com.tendermint.types.Validator.Builder builderForValue) { + copyOnWrite(); + instance.setValidators(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder addValidators(com.tendermint.types.Validator value) { + copyOnWrite(); + instance.addValidators(value); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder addValidators( + int index, com.tendermint.types.Validator value) { + copyOnWrite(); + instance.addValidators(index, value); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder addValidators( + com.tendermint.types.Validator.Builder builderForValue) { + copyOnWrite(); + instance.addValidators(builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder addValidators( + int index, com.tendermint.types.Validator.Builder builderForValue) { + copyOnWrite(); + instance.addValidators(index, + builderForValue.build()); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder addAllValidators( + java.lang.Iterable values) { + copyOnWrite(); + instance.addAllValidators(values); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder clearValidators() { + copyOnWrite(); + instance.clearValidators(); + return this; + } + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + public Builder removeValidators(int index) { + copyOnWrite(); + instance.removeValidators(index); + return this; + } + + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + @java.lang.Override + public boolean hasProposer() { + return instance.hasProposer(); + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + @java.lang.Override + public com.tendermint.types.Validator getProposer() { + return instance.getProposer(); + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + public Builder setProposer(com.tendermint.types.Validator value) { + copyOnWrite(); + instance.setProposer(value); + return this; + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + public Builder setProposer( + com.tendermint.types.Validator.Builder builderForValue) { + copyOnWrite(); + instance.setProposer(builderForValue.build()); + return this; + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + public Builder mergeProposer(com.tendermint.types.Validator value) { + copyOnWrite(); + instance.mergeProposer(value); + return this; + } + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + */ + public Builder clearProposer() { copyOnWrite(); + instance.clearProposer(); + return this; + } + + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @return The totalVotingPower. + */ + @java.lang.Override + public long getTotalVotingPower() { + return instance.getTotalVotingPower(); + } + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @param value The totalVotingPower to set. + * @return This builder for chaining. + */ + public Builder setTotalVotingPower(long value) { + copyOnWrite(); + instance.setTotalVotingPower(value); + return this; + } + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @return This builder for chaining. + */ + public Builder clearTotalVotingPower() { + copyOnWrite(); + instance.clearTotalVotingPower(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.ValidatorSet) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.ValidatorSet(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "validators_", + com.tendermint.types.Validator.class, + "proposer_", + "totalVotingPower_", + }; + java.lang.String info = + "\u0000\u0003\u0000\u0000\u0001\u0003\u0003\u0000\u0001\u0000\u0001\u001b\u0002\t" + + "\u0003\u0002"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.ValidatorSet.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.ValidatorSet) + private static final com.tendermint.types.ValidatorSet DEFAULT_INSTANCE; + static { + ValidatorSet defaultInstance = new ValidatorSet(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + ValidatorSet.class, defaultInstance); + } + + public static com.tendermint.types.ValidatorSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSetOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSetOrBuilder.java new file mode 100644 index 000000000..76fc0be03 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/ValidatorSetOrBuilder.java @@ -0,0 +1,40 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/validator.proto + +package com.tendermint.types; + +public interface ValidatorSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.ValidatorSet) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + java.util.List + getValidatorsList(); + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + com.tendermint.types.Validator getValidators(int index); + /** + * repeated .tendermint.types.Validator validators = 1 [json_name = "validators"]; + */ + int getValidatorsCount(); + + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + * @return Whether the proposer field is set. + */ + boolean hasProposer(); + /** + * .tendermint.types.Validator proposer = 2 [json_name = "proposer"]; + * @return The proposer. + */ + com.tendermint.types.Validator getProposer(); + + /** + * int64 total_voting_power = 3 [json_name = "totalVotingPower"]; + * @return The totalVotingPower. + */ + long getTotalVotingPower(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Vote.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Vote.java new file mode 100644 index 000000000..fa062bd07 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/Vote.java @@ -0,0 +1,794 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +/** + *
+ * Vote represents a prevote, precommit, or commit vote from validators for
+ * consensus.
+ * 
+ * + * Protobuf type {@code tendermint.types.Vote} + */ +public final class Vote extends + com.google.protobuf.GeneratedMessageLite< + Vote, Vote.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.types.Vote) + VoteOrBuilder { + private Vote() { + validatorAddress_ = com.google.protobuf.ByteString.EMPTY; + signature_ = com.google.protobuf.ByteString.EMPTY; + } + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.tendermint.types.SignedMsgType getType() { + com.tendermint.types.SignedMsgType result = com.tendermint.types.SignedMsgType.forNumber(type_); + return result == null ? com.tendermint.types.SignedMsgType.UNRECOGNIZED : result; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + */ + private void setTypeValue(int value) { + type_ = value; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The type to set. + */ + private void setType(com.tendermint.types.SignedMsgType value) { + type_ = value.getNumber(); + + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + */ + private void clearType() { + + type_ = 0; + } + + public static final int HEIGHT_FIELD_NUMBER = 2; + private long height_; + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return height_; + } + /** + * int64 height = 2 [json_name = "height"]; + * @param value The height to set. + */ + private void setHeight(long value) { + + height_ = value; + } + /** + * int64 height = 2 [json_name = "height"]; + */ + private void clearHeight() { + + height_ = 0L; + } + + public static final int ROUND_FIELD_NUMBER = 3; + private int round_; + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return round_; + } + /** + * int32 round = 3 [json_name = "round"]; + * @param value The round to set. + */ + private void setRound(int value) { + + round_ = value; + } + /** + * int32 round = 3 [json_name = "round"]; + */ + private void clearRound() { + + round_ = 0; + } + + public static final int BLOCK_ID_FIELD_NUMBER = 4; + private com.tendermint.types.BlockID blockId_; + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return blockId_ != null; + } + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return blockId_ == null ? com.tendermint.types.BlockID.getDefaultInstance() : blockId_; + } + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void setBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + blockId_ = value; + + } + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeBlockId(com.tendermint.types.BlockID value) { + value.getClass(); + if (blockId_ != null && + blockId_ != com.tendermint.types.BlockID.getDefaultInstance()) { + blockId_ = + com.tendermint.types.BlockID.newBuilder(blockId_).mergeFrom(value).buildPartial(); + } else { + blockId_ = value; + } + + } + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + private void clearBlockId() { blockId_ = null; + + } + + public static final int TIMESTAMP_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp timestamp_; + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return timestamp_ != null; + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void setTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + timestamp_ = value; + + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.SuppressWarnings({"ReferenceEquality"}) + private void mergeTimestamp(com.google.protobuf.Timestamp value) { + value.getClass(); + if (timestamp_ != null && + timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timestamp_ = + com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + } else { + timestamp_ = value; + } + + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + private void clearTimestamp() { timestamp_ = null; + + } + + public static final int VALIDATOR_ADDRESS_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString validatorAddress_; + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorAddress() { + return validatorAddress_; + } + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + */ + private void setValidatorAddress(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + validatorAddress_ = value; + } + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + */ + private void clearValidatorAddress() { + + validatorAddress_ = getDefaultInstance().getValidatorAddress(); + } + + public static final int VALIDATOR_INDEX_FIELD_NUMBER = 7; + private int validatorIndex_; + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @return The validatorIndex. + */ + @java.lang.Override + public int getValidatorIndex() { + return validatorIndex_; + } + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @param value The validatorIndex to set. + */ + private void setValidatorIndex(int value) { + + validatorIndex_ = value; + } + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + */ + private void clearValidatorIndex() { + + validatorIndex_ = 0; + } + + public static final int SIGNATURE_FIELD_NUMBER = 8; + private com.google.protobuf.ByteString signature_; + /** + * bytes signature = 8 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return signature_; + } + /** + * bytes signature = 8 [json_name = "signature"]; + * @param value The signature to set. + */ + private void setSignature(com.google.protobuf.ByteString value) { + java.lang.Class valueClass = value.getClass(); + + signature_ = value; + } + /** + * bytes signature = 8 [json_name = "signature"]; + */ + private void clearSignature() { + + signature_ = getDefaultInstance().getSignature(); + } + + public static com.tendermint.types.Vote parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Vote parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Vote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Vote parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Vote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.types.Vote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.types.Vote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Vote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Vote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Vote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.types.Vote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.types.Vote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.types.Vote prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Vote represents a prevote, precommit, or commit vote from validators for
+   * consensus.
+   * 
+ * + * Protobuf type {@code tendermint.types.Vote} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.types.Vote, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.types.Vote) + com.tendermint.types.VoteOrBuilder { + // Construct using com.tendermint.types.Vote.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return instance.getTypeValue(); + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + copyOnWrite(); + instance.setTypeValue(value); + return this; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + @java.lang.Override + public com.tendermint.types.SignedMsgType getType() { + return instance.getType(); + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setType(com.tendermint.types.SignedMsgType value) { + copyOnWrite(); + instance.setType(value); + return this; + } + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return This builder for chaining. + */ + public Builder clearType() { + copyOnWrite(); + instance.clearType(); + return this; + } + + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + @java.lang.Override + public long getHeight() { + return instance.getHeight(); + } + /** + * int64 height = 2 [json_name = "height"]; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(long value) { + copyOnWrite(); + instance.setHeight(value); + return this; + } + /** + * int64 height = 2 [json_name = "height"]; + * @return This builder for chaining. + */ + public Builder clearHeight() { + copyOnWrite(); + instance.clearHeight(); + return this; + } + + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + @java.lang.Override + public int getRound() { + return instance.getRound(); + } + /** + * int32 round = 3 [json_name = "round"]; + * @param value The round to set. + * @return This builder for chaining. + */ + public Builder setRound(int value) { + copyOnWrite(); + instance.setRound(value); + return this; + } + /** + * int32 round = 3 [json_name = "round"]; + * @return This builder for chaining. + */ + public Builder clearRound() { + copyOnWrite(); + instance.clearRound(); + return this; + } + + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public boolean hasBlockId() { + return instance.hasBlockId(); + } + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + @java.lang.Override + public com.tendermint.types.BlockID getBlockId() { + return instance.getBlockId(); + } + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.setBlockId(value); + return this; + } + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder setBlockId( + com.tendermint.types.BlockID.Builder builderForValue) { + copyOnWrite(); + instance.setBlockId(builderForValue.build()); + return this; + } + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder mergeBlockId(com.tendermint.types.BlockID value) { + copyOnWrite(); + instance.mergeBlockId(value); + return this; + } + /** + *
+     * zero if vote is nil.
+     * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + */ + public Builder clearBlockId() { copyOnWrite(); + instance.clearBlockId(); + return this; + } + + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public boolean hasTimestamp() { + return instance.hasTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + @java.lang.Override + public com.google.protobuf.Timestamp getTimestamp() { + return instance.getTimestamp(); + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.setTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder setTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + copyOnWrite(); + instance.setTimestamp(builderForValue.build()); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { + copyOnWrite(); + instance.mergeTimestamp(value); + return this; + } + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + */ + public Builder clearTimestamp() { copyOnWrite(); + instance.clearTimestamp(); + return this; + } + + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString getValidatorAddress() { + return instance.getValidatorAddress(); + } + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @param value The validatorAddress to set. + * @return This builder for chaining. + */ + public Builder setValidatorAddress(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setValidatorAddress(value); + return this; + } + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @return This builder for chaining. + */ + public Builder clearValidatorAddress() { + copyOnWrite(); + instance.clearValidatorAddress(); + return this; + } + + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @return The validatorIndex. + */ + @java.lang.Override + public int getValidatorIndex() { + return instance.getValidatorIndex(); + } + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @param value The validatorIndex to set. + * @return This builder for chaining. + */ + public Builder setValidatorIndex(int value) { + copyOnWrite(); + instance.setValidatorIndex(value); + return this; + } + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @return This builder for chaining. + */ + public Builder clearValidatorIndex() { + copyOnWrite(); + instance.clearValidatorIndex(); + return this; + } + + /** + * bytes signature = 8 [json_name = "signature"]; + * @return The signature. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSignature() { + return instance.getSignature(); + } + /** + * bytes signature = 8 [json_name = "signature"]; + * @param value The signature to set. + * @return This builder for chaining. + */ + public Builder setSignature(com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSignature(value); + return this; + } + /** + * bytes signature = 8 [json_name = "signature"]; + * @return This builder for chaining. + */ + public Builder clearSignature() { + copyOnWrite(); + instance.clearSignature(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.types.Vote) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.types.Vote(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "type_", + "height_", + "round_", + "blockId_", + "timestamp_", + "validatorAddress_", + "validatorIndex_", + "signature_", + }; + java.lang.String info = + "\u0000\b\u0000\u0000\u0001\b\b\u0000\u0000\u0000\u0001\f\u0002\u0002\u0003\u0004" + + "\u0004\t\u0005\t\u0006\n\u0007\u0004\b\n"; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.types.Vote.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.types.Vote) + private static final com.tendermint.types.Vote DEFAULT_INSTANCE; + static { + Vote defaultInstance = new Vote(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Vote.class, defaultInstance); + } + + public static com.tendermint.types.Vote getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/VoteOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/VoteOrBuilder.java new file mode 100644 index 000000000..45127e61f --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/types/VoteOrBuilder.java @@ -0,0 +1,80 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/types/types.proto + +package com.tendermint.types; + +public interface VoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.types.Vote) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * .tendermint.types.SignedMsgType type = 1 [json_name = "type"]; + * @return The type. + */ + com.tendermint.types.SignedMsgType getType(); + + /** + * int64 height = 2 [json_name = "height"]; + * @return The height. + */ + long getHeight(); + + /** + * int32 round = 3 [json_name = "round"]; + * @return The round. + */ + int getRound(); + + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return Whether the blockId field is set. + */ + boolean hasBlockId(); + /** + *
+   * zero if vote is nil.
+   * 
+ * + * .tendermint.types.BlockID block_id = 4 [json_name = "blockId", (.gogoproto.nullable) = false, (.gogoproto.customname) = "BlockID"]; + * @return The blockId. + */ + com.tendermint.types.BlockID getBlockId(); + + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return Whether the timestamp field is set. + */ + boolean hasTimestamp(); + /** + * .google.protobuf.Timestamp timestamp = 5 [json_name = "timestamp", (.gogoproto.nullable) = false, (.gogoproto.stdtime) = true]; + * @return The timestamp. + */ + com.google.protobuf.Timestamp getTimestamp(); + + /** + * bytes validator_address = 6 [json_name = "validatorAddress"]; + * @return The validatorAddress. + */ + com.google.protobuf.ByteString getValidatorAddress(); + + /** + * int32 validator_index = 7 [json_name = "validatorIndex"]; + * @return The validatorIndex. + */ + int getValidatorIndex(); + + /** + * bytes signature = 8 [json_name = "signature"]; + * @return The signature. + */ + com.google.protobuf.ByteString getSignature(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/App.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/App.java new file mode 100644 index 000000000..c3ff9c6f6 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/App.java @@ -0,0 +1,349 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/version/types.proto + +package com.tendermint.version; + +/** + *
+ * App includes the protocol and software version for the application.
+ * This information is included in ResponseInfo. The App.Protocol can be
+ * updated in ResponseEndBlock.
+ * 
+ * + * Protobuf type {@code tendermint.version.App} + */ +public final class App extends + com.google.protobuf.GeneratedMessageLite< + App, App.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.version.App) + AppOrBuilder { + private App() { + software_ = ""; + } + public static final int PROTOCOL_FIELD_NUMBER = 1; + private long protocol_; + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @return The protocol. + */ + @java.lang.Override + public long getProtocol() { + return protocol_; + } + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @param value The protocol to set. + */ + private void setProtocol(long value) { + + protocol_ = value; + } + /** + * uint64 protocol = 1 [json_name = "protocol"]; + */ + private void clearProtocol() { + + protocol_ = 0L; + } + + public static final int SOFTWARE_FIELD_NUMBER = 2; + private java.lang.String software_; + /** + * string software = 2 [json_name = "software"]; + * @return The software. + */ + @java.lang.Override + public java.lang.String getSoftware() { + return software_; + } + /** + * string software = 2 [json_name = "software"]; + * @return The bytes for software. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSoftwareBytes() { + return com.google.protobuf.ByteString.copyFromUtf8(software_); + } + /** + * string software = 2 [json_name = "software"]; + * @param value The software to set. + */ + private void setSoftware( + java.lang.String value) { + java.lang.Class valueClass = value.getClass(); + + software_ = value; + } + /** + * string software = 2 [json_name = "software"]; + */ + private void clearSoftware() { + + software_ = getDefaultInstance().getSoftware(); + } + /** + * string software = 2 [json_name = "software"]; + * @param value The bytes for software to set. + */ + private void setSoftwareBytes( + com.google.protobuf.ByteString value) { + checkByteStringIsUtf8(value); + software_ = value.toStringUtf8(); + + } + + public static com.tendermint.version.App parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.App parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.App parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.App parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.App parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.App parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.App parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.App parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.version.App parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.App parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.version.App parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.App parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.version.App prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * App includes the protocol and software version for the application.
+   * This information is included in ResponseInfo. The App.Protocol can be
+   * updated in ResponseEndBlock.
+   * 
+ * + * Protobuf type {@code tendermint.version.App} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.version.App, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.version.App) + com.tendermint.version.AppOrBuilder { + // Construct using com.tendermint.version.App.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @return The protocol. + */ + @java.lang.Override + public long getProtocol() { + return instance.getProtocol(); + } + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @param value The protocol to set. + * @return This builder for chaining. + */ + public Builder setProtocol(long value) { + copyOnWrite(); + instance.setProtocol(value); + return this; + } + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @return This builder for chaining. + */ + public Builder clearProtocol() { + copyOnWrite(); + instance.clearProtocol(); + return this; + } + + /** + * string software = 2 [json_name = "software"]; + * @return The software. + */ + @java.lang.Override + public java.lang.String getSoftware() { + return instance.getSoftware(); + } + /** + * string software = 2 [json_name = "software"]; + * @return The bytes for software. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSoftwareBytes() { + return instance.getSoftwareBytes(); + } + /** + * string software = 2 [json_name = "software"]; + * @param value The software to set. + * @return This builder for chaining. + */ + public Builder setSoftware( + java.lang.String value) { + copyOnWrite(); + instance.setSoftware(value); + return this; + } + /** + * string software = 2 [json_name = "software"]; + * @return This builder for chaining. + */ + public Builder clearSoftware() { + copyOnWrite(); + instance.clearSoftware(); + return this; + } + /** + * string software = 2 [json_name = "software"]; + * @param value The bytes for software to set. + * @return This builder for chaining. + */ + public Builder setSoftwareBytes( + com.google.protobuf.ByteString value) { + copyOnWrite(); + instance.setSoftwareBytes(value); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.version.App) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.version.App(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "protocol_", + "software_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0208" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.version.App.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.version.App) + private static final com.tendermint.version.App DEFAULT_INSTANCE; + static { + App defaultInstance = new App(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + App.class, defaultInstance); + } + + public static com.tendermint.version.App getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/AppOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/AppOrBuilder.java new file mode 100644 index 000000000..590bf97e4 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/AppOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/version/types.proto + +package com.tendermint.version; + +public interface AppOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.version.App) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 protocol = 1 [json_name = "protocol"]; + * @return The protocol. + */ + long getProtocol(); + + /** + * string software = 2 [json_name = "software"]; + * @return The software. + */ + java.lang.String getSoftware(); + /** + * string software = 2 [json_name = "software"]; + * @return The bytes for software. + */ + com.google.protobuf.ByteString + getSoftwareBytes(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/Consensus.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/Consensus.java new file mode 100644 index 000000000..e42c06c98 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/Consensus.java @@ -0,0 +1,306 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/version/types.proto + +package com.tendermint.version; + +/** + *
+ * Consensus captures the consensus rules for processing a block in the blockchain,
+ * including all blockchain data structures and the rules of the application's
+ * state transition machine.
+ * 
+ * + * Protobuf type {@code tendermint.version.Consensus} + */ +public final class Consensus extends + com.google.protobuf.GeneratedMessageLite< + Consensus, Consensus.Builder> implements + // @@protoc_insertion_point(message_implements:tendermint.version.Consensus) + ConsensusOrBuilder { + private Consensus() { + } + public static final int BLOCK_FIELD_NUMBER = 1; + private long block_; + /** + * uint64 block = 1 [json_name = "block"]; + * @return The block. + */ + @java.lang.Override + public long getBlock() { + return block_; + } + /** + * uint64 block = 1 [json_name = "block"]; + * @param value The block to set. + */ + private void setBlock(long value) { + + block_ = value; + } + /** + * uint64 block = 1 [json_name = "block"]; + */ + private void clearBlock() { + + block_ = 0L; + } + + public static final int APP_FIELD_NUMBER = 2; + private long app_; + /** + * uint64 app = 2 [json_name = "app"]; + * @return The app. + */ + @java.lang.Override + public long getApp() { + return app_; + } + /** + * uint64 app = 2 [json_name = "app"]; + * @param value The app to set. + */ + private void setApp(long value) { + + app_ = value; + } + /** + * uint64 app = 2 [json_name = "app"]; + */ + private void clearApp() { + + app_ = 0L; + } + + public static com.tendermint.version.Consensus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.Consensus parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.Consensus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.Consensus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.Consensus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data); + } + public static com.tendermint.version.Consensus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, data, extensionRegistry); + } + public static com.tendermint.version.Consensus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.Consensus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.version.Consensus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.Consensus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); + } + public static com.tendermint.version.Consensus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input); + } + public static com.tendermint.version.Consensus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageLite.parseFrom( + DEFAULT_INSTANCE, input, extensionRegistry); + } + + public static Builder newBuilder() { + return (Builder) DEFAULT_INSTANCE.createBuilder(); + } + public static Builder newBuilder(com.tendermint.version.Consensus prototype) { + return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); + } + + /** + *
+   * Consensus captures the consensus rules for processing a block in the blockchain,
+   * including all blockchain data structures and the rules of the application's
+   * state transition machine.
+   * 
+ * + * Protobuf type {@code tendermint.version.Consensus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + com.tendermint.version.Consensus, Builder> implements + // @@protoc_insertion_point(builder_implements:tendermint.version.Consensus) + com.tendermint.version.ConsensusOrBuilder { + // Construct using com.tendermint.version.Consensus.newBuilder() + private Builder() { + super(DEFAULT_INSTANCE); + } + + + /** + * uint64 block = 1 [json_name = "block"]; + * @return The block. + */ + @java.lang.Override + public long getBlock() { + return instance.getBlock(); + } + /** + * uint64 block = 1 [json_name = "block"]; + * @param value The block to set. + * @return This builder for chaining. + */ + public Builder setBlock(long value) { + copyOnWrite(); + instance.setBlock(value); + return this; + } + /** + * uint64 block = 1 [json_name = "block"]; + * @return This builder for chaining. + */ + public Builder clearBlock() { + copyOnWrite(); + instance.clearBlock(); + return this; + } + + /** + * uint64 app = 2 [json_name = "app"]; + * @return The app. + */ + @java.lang.Override + public long getApp() { + return instance.getApp(); + } + /** + * uint64 app = 2 [json_name = "app"]; + * @param value The app to set. + * @return This builder for chaining. + */ + public Builder setApp(long value) { + copyOnWrite(); + instance.setApp(value); + return this; + } + /** + * uint64 app = 2 [json_name = "app"]; + * @return This builder for chaining. + */ + public Builder clearApp() { + copyOnWrite(); + instance.clearApp(); + return this; + } + + // @@protoc_insertion_point(builder_scope:tendermint.version.Consensus) + } + @java.lang.Override + @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) + protected final java.lang.Object dynamicMethod( + com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, + java.lang.Object arg0, java.lang.Object arg1) { + switch (method) { + case NEW_MUTABLE_INSTANCE: { + return new com.tendermint.version.Consensus(); + } + case NEW_BUILDER: { + return new Builder(); + } + case BUILD_MESSAGE_INFO: { + java.lang.Object[] objects = new java.lang.Object[] { + "block_", + "app_", + }; + java.lang.String info = + "\u0000\u0002\u0000\u0000\u0001\u0002\u0002\u0000\u0000\u0000\u0001\u0003\u0002\u0003" + + ""; + return newMessageInfo(DEFAULT_INSTANCE, info, objects); + } + // fall through + case GET_DEFAULT_INSTANCE: { + return DEFAULT_INSTANCE; + } + case GET_PARSER: { + com.google.protobuf.Parser parser = PARSER; + if (parser == null) { + synchronized (com.tendermint.version.Consensus.class) { + parser = PARSER; + if (parser == null) { + parser = + new DefaultInstanceBasedParser( + DEFAULT_INSTANCE); + PARSER = parser; + } + } + } + return parser; + } + case GET_MEMOIZED_IS_INITIALIZED: { + return (byte) 1; + } + case SET_MEMOIZED_IS_INITIALIZED: { + return null; + } + } + throw new UnsupportedOperationException(); + } + + + // @@protoc_insertion_point(class_scope:tendermint.version.Consensus) + private static final com.tendermint.version.Consensus DEFAULT_INSTANCE; + static { + Consensus defaultInstance = new Consensus(); + // New instances are implicitly immutable so no need to make + // immutable. + DEFAULT_INSTANCE = defaultInstance; + com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( + Consensus.class, defaultInstance); + } + + public static com.tendermint.version.Consensus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static volatile com.google.protobuf.Parser PARSER; + + public static com.google.protobuf.Parser parser() { + return DEFAULT_INSTANCE.getParserForType(); + } +} + diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/ConsensusOrBuilder.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/ConsensusOrBuilder.java new file mode 100644 index 000000000..bafc955e2 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/ConsensusOrBuilder.java @@ -0,0 +1,21 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/version/types.proto + +package com.tendermint.version; + +public interface ConsensusOrBuilder extends + // @@protoc_insertion_point(interface_extends:tendermint.version.Consensus) + com.google.protobuf.MessageLiteOrBuilder { + + /** + * uint64 block = 1 [json_name = "block"]; + * @return The block. + */ + long getBlock(); + + /** + * uint64 app = 2 [json_name = "app"]; + * @return The app. + */ + long getApp(); +} diff --git a/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/TypesProto.java b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/TypesProto.java new file mode 100644 index 000000000..01c83c704 --- /dev/null +++ b/contracts/javascore/lightclients/tendermint/src/test/java/ibc/tendermint/test/proto/tendermint/version/TypesProto.java @@ -0,0 +1,16 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tendermint/version/types.proto + +package com.tendermint.version; + +public final class TypesProto { + private TypesProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/contracts/javascore/modules/mockapp/build.gradle b/contracts/javascore/modules/mockapp/build.gradle index fc1171679..e29c3ae42 100644 --- a/contracts/javascore/modules/mockapp/build.gradle +++ b/contracts/javascore/modules/mockapp/build.gradle @@ -4,6 +4,7 @@ dependencies { compileOnly("foundation.icon:javaee-api:$javaeeVersion") implementation("foundation.icon:javaee-scorex:$scorexVersion") implementation project(':lib') + implementation project(':proto-lib') implementation project(':score-util') implementation project(':ibc') diff --git a/contracts/javascore/modules/mockapp/src/main/java/ibc/mockapp/MockApp.java b/contracts/javascore/modules/mockapp/src/main/java/ibc/mockapp/MockApp.java index 7bb92287f..4b5c79882 100644 --- a/contracts/javascore/modules/mockapp/src/main/java/ibc/mockapp/MockApp.java +++ b/contracts/javascore/modules/mockapp/src/main/java/ibc/mockapp/MockApp.java @@ -3,10 +3,10 @@ import java.math.BigInteger; import java.util.Map; -import ibc.icon.interfaces.IIBCModule; -import icon.proto.core.client.Height; import icon.proto.core.channel.Packet; import icon.proto.core.channel.Channel.Counterparty; +import icon.proto.core.client.Height; +import icon.ibc.interfaces.IIBCModule; import score.Address; import score.Context; import score.VarDB; diff --git a/contracts/javascore/proto-lib/build.gradle b/contracts/javascore/proto-lib/build.gradle new file mode 100644 index 000000000..2112e7d15 --- /dev/null +++ b/contracts/javascore/proto-lib/build.gradle @@ -0,0 +1,17 @@ +version = '0.1.0' + +apply plugin: 'java-library' + +optimizedJar.enabled = false + +dependencies { + compileOnly("foundation.icon:javaee-api:$javaeeVersion") + implementation("foundation.icon:javaee-scorex:$scorexVersion") + implementation project(':score-util') + + compileOnly("foundation.icon:javaee-score-client:$scoreClientVersion") + annotationProcessor("foundation.icon:javaee-score-client:$scoreClientVersion") + compileOnly("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion") + compileOnly("foundation.icon:icon-sdk:$iconsdkVersion") + +} \ No newline at end of file diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchEntry.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchEntry.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchEntry.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchEntry.java index b52936cd9..800938350 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchEntry.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchEntry.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchProof.java similarity index 96% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchProof.java index bb711115c..c5e21efd6 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/BatchProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/BatchProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CommitmentProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CommitmentProof.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CommitmentProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CommitmentProof.java index 47fa142c6..ff34b02b3 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CommitmentProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CommitmentProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchEntry.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchEntry.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchEntry.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchEntry.java index 00be2e01b..61f7750c7 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchEntry.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchEntry.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchProof.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchProof.java index 639c1200a..79732904c 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedBatchProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedBatchProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedExistenceProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedExistenceProof.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedExistenceProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedExistenceProof.java index 0e65292e3..6ed3015a4 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedExistenceProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedExistenceProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedNonExistenceProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedNonExistenceProof.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedNonExistenceProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedNonExistenceProof.java index d69d005a6..5d4785b16 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/CompressedNonExistenceProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/CompressedNonExistenceProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ExistenceProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ExistenceProof.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ExistenceProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ExistenceProof.java index a1185209d..269baa23d 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ExistenceProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ExistenceProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/HashOp.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/HashOp.java similarity index 58% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/HashOp.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/HashOp.java index c678aca68..0343f0262 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/HashOp.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/HashOp.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; public class HashOp { public static final int NO_HASH = 0; @@ -7,11 +7,17 @@ public class HashOp { public static final int SHA512 = 2; - public static final int KECCAK = 3; + public static final int KECCAK256 = 3; public static final int RIPEMD160 = 4; public static final int BITCOIN = 5; public static final int SHA512_256 = 6; + + public static final int BLAKE2B_512 = 7; + + public static final int BLAKE2S_256 = 8; + + public static final int BLAKE3 = 9; } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerOp.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerOp.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerOp.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerOp.java index 0dc6ec0f4..8fddcb22e 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerOp.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerOp.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerSpec.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerSpec.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerSpec.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerSpec.java index 35d85d14a..1a9498883 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/InnerSpec.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/InnerSpec.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LeafOp.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LeafOp.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LeafOp.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LeafOp.java index 162a98314..a2b488bab 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LeafOp.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LeafOp.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LengthOp.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LengthOp.java similarity index 92% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LengthOp.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LengthOp.java index d6849b353..07865cdfd 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/LengthOp.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/LengthOp.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; public class LengthOp { public static final int NO_PREFIX = 0; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/NonExistenceProof.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/NonExistenceProof.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/NonExistenceProof.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/NonExistenceProof.java index 91a9b37e5..ad5ae39cc 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/NonExistenceProof.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/NonExistenceProof.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ProofSpec.java b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ProofSpec.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ProofSpec.java rename to contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ProofSpec.java index 75e8d3b04..451af134b 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/ProofSpec.java +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/ics23/v1/ProofSpec.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package cosmos.ics23.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java new file mode 100644 index 000000000..7421efa44 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/CancelSoftwareUpgradeProposal.java @@ -0,0 +1,60 @@ +package cosmos.upgrade.v1beta1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class CancelSoftwareUpgradeProposal extends ProtoMessage { + private String title = ""; + + private String description = ""; + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.title), + Proto.encode(2, this.description)); + } + + public static CancelSoftwareUpgradeProposal decode(byte[] data) { + CancelSoftwareUpgradeProposal obj = new CancelSoftwareUpgradeProposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.title = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.description = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/ModuleVersion.java b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/ModuleVersion.java new file mode 100644 index 000000000..87f6812d3 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/ModuleVersion.java @@ -0,0 +1,61 @@ +package cosmos.upgrade.v1beta1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.math.BigInteger; + +public class ModuleVersion extends ProtoMessage { + private String name = ""; + + private BigInteger version = BigInteger.ZERO; + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public BigInteger getVersion() { + return this.version; + } + + public void setVersion(BigInteger version) { + this.version = version; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.name), + Proto.encode(2, this.version)); + } + + public static ModuleVersion decode(byte[] data) { + ModuleVersion obj = new ModuleVersion(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.name = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.version = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/Plan.java b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/Plan.java new file mode 100644 index 000000000..d72f1eca9 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/Plan.java @@ -0,0 +1,114 @@ +package cosmos.upgrade.v1beta1; + +import google.protobuf.Any; +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.math.BigInteger; + +public class Plan extends ProtoMessage { + private String name = ""; + + private Timestamp time = new google.protobuf.Timestamp(); + + private BigInteger height = BigInteger.ZERO; + + private String info = ""; + + private Any upgradedClientState = new google.protobuf.Any(); + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public Timestamp getTime() { + return this.time; + } + + public void setTime(Timestamp time) { + this.time = time; + } + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public String getInfo() { + return this.info; + } + + public void setInfo(String info) { + this.info = info; + } + + public Any getUpgradedClientState() { + return this.upgradedClientState; + } + + public void setUpgradedClientState(Any upgradedClientState) { + this.upgradedClientState = upgradedClientState; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.name), + Proto.encode(2, this.time), + Proto.encode(3, this.height), + Proto.encode(4, this.info), + Proto.encode(5, this.upgradedClientState)); + } + + public static Plan decode(byte[] data) { + Plan obj = new Plan(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.name = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.time = google.protobuf.Timestamp.decode(resp.res); + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.info = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.upgradedClientState = google.protobuf.Any.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java new file mode 100644 index 000000000..f8d30ae28 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/cosmos/upgrade/v1beta1/SoftwareUpgradeProposal.java @@ -0,0 +1,77 @@ +package cosmos.upgrade.v1beta1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class SoftwareUpgradeProposal extends ProtoMessage { + private String title = ""; + + private String description = ""; + + private Plan plan = new Plan(); + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Plan getPlan() { + return this.plan; + } + + public void setPlan(Plan plan) { + this.plan = plan; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.title), + Proto.encode(2, this.description), + Proto.encode(3, this.plan)); + } + + public static SoftwareUpgradeProposal decode(byte[] data) { + SoftwareUpgradeProposal obj = new SoftwareUpgradeProposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.title = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.description = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.plan = Plan.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleNode.java b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Any.java similarity index 62% rename from contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleNode.java rename to contracts/javascore/proto-lib/src/main/java/google/protobuf/Any.java index 7c95e7cde..7364d2c93 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleNode.java +++ b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Any.java @@ -1,21 +1,21 @@ -package icon.proto.icon.types.v1; +package google.protobuf; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; -import java.math.BigInteger; +import java.lang.String; -public class MerkleNode extends ProtoMessage { - private BigInteger dir = BigInteger.ZERO; +public class Any extends ProtoMessage { + private String typeUrl = ""; private byte[] value = new byte[0]; - public BigInteger getDir() { - return this.dir; + public String getTypeUrl() { + return this.typeUrl; } - public void setDir(BigInteger dir) { - this.dir = dir; + public void setTypeUrl(String typeUrl) { + this.typeUrl = typeUrl; } public byte[] getValue() { @@ -28,12 +28,12 @@ public void setValue(byte[] value) { public byte[] encode() { return ByteUtil.join( - Proto.encode(1, this.dir), + Proto.encode(1, this.typeUrl), Proto.encode(2, this.value)); } - public static MerkleNode decode(byte[] data) { - MerkleNode obj = new MerkleNode(); + public static Any decode(byte[] data) { + Any obj = new Any(); int index = 0; int order; int length = data.length; @@ -42,9 +42,9 @@ public static MerkleNode decode(byte[] data) { index++; switch(order) { case 1: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + Proto.DecodeResponse resp = Proto.decodeString(data, index); index = resp.index; - obj.dir = resp.res; + obj.typeUrl = resp.res; break; } case 2: { diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Duration.java b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Duration.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Duration.java rename to contracts/javascore/proto-lib/src/main/java/google/protobuf/Duration.java index d556663c2..a97424c53 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Duration.java +++ b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Duration.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package google.protobuf; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Timestamp.java b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Timestamp.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Timestamp.java rename to contracts/javascore/proto-lib/src/main/java/google/protobuf/Timestamp.java index 27bcfa95f..07c8313f4 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Timestamp.java +++ b/contracts/javascore/proto-lib/src/main/java/google/protobuf/Timestamp.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package google.protobuf; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientConsensusStates.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientConsensusStates.java new file mode 100644 index 000000000..5ef0247e4 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientConsensusStates.java @@ -0,0 +1,62 @@ +package ibc.core.client.v1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.util.List; +import scorex.util.ArrayList; + +public class ClientConsensusStates extends ProtoMessage { + private String clientId = ""; + + private List consensusStates = new ArrayList<>(); + + public String getClientId() { + return this.clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public List getConsensusStates() { + return this.consensusStates; + } + + public void setConsensusStates(List consensusStates) { + this.consensusStates = consensusStates; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.clientId), + Proto.encodeMessageArray(2, this.consensusStates)); + } + + public static ClientConsensusStates decode(byte[] data) { + ClientConsensusStates obj = new ClientConsensusStates(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.clientId = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.consensusStates.add(ConsensusStateWithHeight.decode(resp.res)); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientUpdateProposal.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientUpdateProposal.java new file mode 100644 index 000000000..cf7edd8e4 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ClientUpdateProposal.java @@ -0,0 +1,94 @@ +package ibc.core.client.v1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class ClientUpdateProposal extends ProtoMessage { + private String title = ""; + + private String description = ""; + + private String subjectClientId = ""; + + private String substituteClientId = ""; + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getSubjectClientId() { + return this.subjectClientId; + } + + public void setSubjectClientId(String subjectClientId) { + this.subjectClientId = subjectClientId; + } + + public String getSubstituteClientId() { + return this.substituteClientId; + } + + public void setSubstituteClientId(String substituteClientId) { + this.substituteClientId = substituteClientId; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.title), + Proto.encode(2, this.description), + Proto.encode(3, this.subjectClientId), + Proto.encode(4, this.substituteClientId)); + } + + public static ClientUpdateProposal decode(byte[] data) { + ClientUpdateProposal obj = new ClientUpdateProposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.title = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.description = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.subjectClientId = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.substituteClientId = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ConsensusStateWithHeight.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ConsensusStateWithHeight.java new file mode 100644 index 000000000..9372c85cf --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/ConsensusStateWithHeight.java @@ -0,0 +1,60 @@ +package ibc.core.client.v1; + +import google.protobuf.Any; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class ConsensusStateWithHeight extends ProtoMessage { + private Height height = new Height(); + + private Any consensusState = new google.protobuf.Any(); + + public Height getHeight() { + return this.height; + } + + public void setHeight(Height height) { + this.height = height; + } + + public Any getConsensusState() { + return this.consensusState; + } + + public void setConsensusState(Any consensusState) { + this.consensusState = consensusState; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.height), + Proto.encode(2, this.consensusState)); + } + + public static ConsensusStateWithHeight decode(byte[] data) { + ConsensusStateWithHeight obj = new ConsensusStateWithHeight(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.height = Height.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.consensusState = google.protobuf.Any.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Height.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Height.java new file mode 100644 index 000000000..24146f413 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Height.java @@ -0,0 +1,60 @@ +package ibc.core.client.v1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class Height extends ProtoMessage { + private BigInteger revisionNumber = BigInteger.ZERO; + + private BigInteger revisionHeight = BigInteger.ZERO; + + public BigInteger getRevisionNumber() { + return this.revisionNumber; + } + + public void setRevisionNumber(BigInteger revisionNumber) { + this.revisionNumber = revisionNumber; + } + + public BigInteger getRevisionHeight() { + return this.revisionHeight; + } + + public void setRevisionHeight(BigInteger revisionHeight) { + this.revisionHeight = revisionHeight; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.revisionNumber), + Proto.encode(2, this.revisionHeight)); + } + + public static Height decode(byte[] data) { + Height obj = new Height(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.revisionNumber = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.revisionHeight = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/IdentifiedClientState.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/IdentifiedClientState.java new file mode 100644 index 000000000..701772f6d --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/IdentifiedClientState.java @@ -0,0 +1,61 @@ +package ibc.core.client.v1; + +import google.protobuf.Any; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class IdentifiedClientState extends ProtoMessage { + private String clientId = ""; + + private Any clientState = new google.protobuf.Any(); + + public String getClientId() { + return this.clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public Any getClientState() { + return this.clientState; + } + + public void setClientState(Any clientState) { + this.clientState = clientState; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.clientId), + Proto.encode(2, this.clientState)); + } + + public static IdentifiedClientState decode(byte[] data) { + IdentifiedClientState obj = new IdentifiedClientState(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.clientId = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.clientState = google.protobuf.Any.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Params.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Params.java new file mode 100644 index 000000000..ddae20d7b --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/Params.java @@ -0,0 +1,45 @@ +package ibc.core.client.v1; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.util.List; +import scorex.util.ArrayList; + +public class Params extends ProtoMessage { + private List allowedClients = new ArrayList<>(); + + public List getAllowedClients() { + return this.allowedClients; + } + + public void setAllowedClients(List allowedClients) { + this.allowedClients = allowedClients; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encodeStringArray(1, this.allowedClients)); + } + + public static Params decode(byte[] data) { + Params obj = new Params(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.allowedClients.add(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/UpgradeProposal.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/UpgradeProposal.java new file mode 100644 index 000000000..d78179229 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/client/v1/UpgradeProposal.java @@ -0,0 +1,96 @@ +package ibc.core.client.v1; + +import cosmos.upgrade.v1beta1.Plan; +import google.protobuf.Any; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class UpgradeProposal extends ProtoMessage { + private String title = ""; + + private String description = ""; + + private Plan plan = new cosmos.upgrade.v1beta1.Plan(); + + private Any upgradedClientState = new google.protobuf.Any(); + + public String getTitle() { + return this.title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Plan getPlan() { + return this.plan; + } + + public void setPlan(Plan plan) { + this.plan = plan; + } + + public Any getUpgradedClientState() { + return this.upgradedClientState; + } + + public void setUpgradedClientState(Any upgradedClientState) { + this.upgradedClientState = upgradedClientState; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.title), + Proto.encode(2, this.description), + Proto.encode(3, this.plan), + Proto.encode(4, this.upgradedClientState)); + } + + public static UpgradeProposal decode(byte[] data) { + UpgradeProposal obj = new UpgradeProposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.title = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.description = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.plan = cosmos.upgrade.v1beta1.Plan.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.upgradedClientState = google.protobuf.Any.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePath.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePath.java similarity index 96% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePath.java rename to contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePath.java index 73a3efc40..dbd2c7908 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePath.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePath.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package ibc.core.commitment.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/MerklePrefix.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePrefix.java similarity index 96% rename from contracts/javascore/lib/src/main/java/icon/proto/core/connection/MerklePrefix.java rename to contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePrefix.java index 7939c734f..6f543b1e6 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/MerklePrefix.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerklePrefix.java @@ -1,4 +1,4 @@ -package icon.proto.core.connection; +package ibc.core.commitment.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleProof.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleProof.java similarity index 86% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleProof.java rename to contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleProof.java index 063c82f2a..15cc2de20 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleProof.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleProof.java @@ -1,5 +1,6 @@ -package icon.proto.core.commitment; +package ibc.core.commitment.v1; +import cosmos.ics23.v1.CommitmentProof; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; @@ -34,7 +35,7 @@ public static MerkleProof decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.proofs.add(CommitmentProof.decode(resp.res)); + obj.proofs.add(cosmos.ics23.v1.CommitmentProof.decode(resp.res)); break; } } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleRoot.java b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleRoot.java similarity index 96% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleRoot.java rename to contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleRoot.java index 0e1bd3eed..4a2508190 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerkleRoot.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/core/commitment/v1/MerkleRoot.java @@ -1,4 +1,4 @@ -package icon.proto.core.commitment; +package ibc.core.commitment.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ClientState.java b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ClientState.java similarity index 62% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ClientState.java rename to contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ClientState.java index b40a46148..c7df44202 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ClientState.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ClientState.java @@ -1,26 +1,34 @@ -package icon.proto.clients.tendermint; +package ibc.lightclients.tendermint.v1; +import cosmos.ics23.v1.ProofSpec; +import google.protobuf.Duration; +import ibc.core.client.v1.Height; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; import java.lang.Boolean; import java.lang.String; -import java.math.BigInteger; +import java.util.List; +import scorex.util.ArrayList; public class ClientState extends ProtoMessage { private String chainId = ""; private Fraction trustLevel = new Fraction(); - private Duration trustingPeriod = new Duration(); + private Duration trustingPeriod = new google.protobuf.Duration(); - private Duration unbondingPeriod = new Duration(); + private Duration unbondingPeriod = new google.protobuf.Duration(); - private Duration maxClockDrift = new Duration(); + private Duration maxClockDrift = new google.protobuf.Duration(); - private BigInteger frozenHeight = BigInteger.ZERO; + private Height frozenHeight = new ibc.core.client.v1.Height(); - private BigInteger latestHeight = BigInteger.ZERO; + private Height latestHeight = new ibc.core.client.v1.Height(); + + private List proofSpecs = new ArrayList<>(); + + private List upgradePath = new ArrayList<>(); private boolean allowUpdateAfterExpiry = false; @@ -66,22 +74,38 @@ public void setMaxClockDrift(Duration maxClockDrift) { this.maxClockDrift = maxClockDrift; } - public BigInteger getFrozenHeight() { + public Height getFrozenHeight() { return this.frozenHeight; } - public void setFrozenHeight(BigInteger frozenHeight) { + public void setFrozenHeight(Height frozenHeight) { this.frozenHeight = frozenHeight; } - public BigInteger getLatestHeight() { + public Height getLatestHeight() { return this.latestHeight; } - public void setLatestHeight(BigInteger latestHeight) { + public void setLatestHeight(Height latestHeight) { this.latestHeight = latestHeight; } + public List getProofSpecs() { + return this.proofSpecs; + } + + public void setProofSpecs(List proofSpecs) { + this.proofSpecs = proofSpecs; + } + + public List getUpgradePath() { + return this.upgradePath; + } + + public void setUpgradePath(List upgradePath) { + this.upgradePath = upgradePath; + } + public boolean getAllowUpdateAfterExpiry() { return this.allowUpdateAfterExpiry; } @@ -107,8 +131,10 @@ public byte[] encode() { Proto.encode(5, this.maxClockDrift), Proto.encode(6, this.frozenHeight), Proto.encode(7, this.latestHeight), - Proto.encode(8, this.allowUpdateAfterExpiry), - Proto.encode(9, this.allowUpdateAfterMisbehaviour)); + Proto.encodeMessageArray(8, this.proofSpecs), + Proto.encodeStringArray(9, this.upgradePath), + Proto.encode(10, this.allowUpdateAfterExpiry), + Proto.encode(11, this.allowUpdateAfterMisbehaviour)); } public static ClientState decode(byte[] data) { @@ -135,40 +161,52 @@ public static ClientState decode(byte[] data) { case 3: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.trustingPeriod = Duration.decode(resp.res); + obj.trustingPeriod = google.protobuf.Duration.decode(resp.res); break; } case 4: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.unbondingPeriod = Duration.decode(resp.res); + obj.unbondingPeriod = google.protobuf.Duration.decode(resp.res); break; } case 5: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.maxClockDrift = Duration.decode(resp.res); + obj.maxClockDrift = google.protobuf.Duration.decode(resp.res); break; } case 6: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.frozenHeight = resp.res; + obj.frozenHeight = ibc.core.client.v1.Height.decode(resp.res); break; } case 7: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.latestHeight = resp.res; + obj.latestHeight = ibc.core.client.v1.Height.decode(resp.res); break; } case 8: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.proofSpecs.add(cosmos.ics23.v1.ProofSpec.decode(resp.res)); + break; + } + case 9: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.upgradePath.add(resp.res); + break; + } + case 10: { Proto.DecodeResponse resp = Proto.decodeBoolean(data, index); index = resp.index; obj.allowUpdateAfterExpiry = resp.res; break; } - case 9: { + case 11: { Proto.DecodeResponse resp = Proto.decodeBoolean(data, index); index = resp.index; obj.allowUpdateAfterMisbehaviour = resp.res; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ConsensusState.java b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ConsensusState.java similarity index 81% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ConsensusState.java rename to contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ConsensusState.java index dd5869662..c909adeb8 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ConsensusState.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/ConsensusState.java @@ -1,13 +1,15 @@ -package icon.proto.clients.tendermint; +package ibc.lightclients.tendermint.v1; +import google.protobuf.Timestamp; +import ibc.core.commitment.v1.MerkleRoot; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; public class ConsensusState extends ProtoMessage { - private Timestamp timestamp = new Timestamp(); + private Timestamp timestamp = new google.protobuf.Timestamp(); - private MerkleRoot root = new MerkleRoot(); + private MerkleRoot root = new ibc.core.commitment.v1.MerkleRoot(); private byte[] nextValidatorsHash = new byte[0]; @@ -54,13 +56,13 @@ public static ConsensusState decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.timestamp = Timestamp.decode(resp.res); + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); break; } case 2: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.root = MerkleRoot.decode(resp.res); + obj.root = ibc.core.commitment.v1.MerkleRoot.decode(resp.res); break; } case 3: { diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Fraction.java b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Fraction.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Fraction.java rename to contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Fraction.java index bfd27289e..fdd9ba5ad 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Fraction.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Fraction.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package ibc.lightclients.tendermint.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/TmHeader.java b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Header.java similarity index 62% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/TmHeader.java rename to contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Header.java index 41ec037d0..46e30967f 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/TmHeader.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Header.java @@ -1,18 +1,20 @@ -package icon.proto.clients.tendermint; +package ibc.lightclients.tendermint.v1; +import ibc.core.client.v1.Height; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; -import java.math.BigInteger; +import tendermint.types.SignedHeader; +import tendermint.types.ValidatorSet; -public class TmHeader extends ProtoMessage { - private SignedHeader signedHeader = new SignedHeader(); +public class Header extends ProtoMessage { + private SignedHeader signedHeader = new tendermint.types.SignedHeader(); - private ValidatorSet validatorSet = new ValidatorSet(); + private ValidatorSet validatorSet = new tendermint.types.ValidatorSet(); - private BigInteger trustedHeight = BigInteger.ZERO; + private Height trustedHeight = new ibc.core.client.v1.Height(); - private ValidatorSet trustedValidators = new ValidatorSet(); + private ValidatorSet trustedValidators = new tendermint.types.ValidatorSet(); public SignedHeader getSignedHeader() { return this.signedHeader; @@ -30,11 +32,11 @@ public void setValidatorSet(ValidatorSet validatorSet) { this.validatorSet = validatorSet; } - public BigInteger getTrustedHeight() { + public Height getTrustedHeight() { return this.trustedHeight; } - public void setTrustedHeight(BigInteger trustedHeight) { + public void setTrustedHeight(Height trustedHeight) { this.trustedHeight = trustedHeight; } @@ -54,8 +56,8 @@ public byte[] encode() { Proto.encode(4, this.trustedValidators)); } - public static TmHeader decode(byte[] data) { - TmHeader obj = new TmHeader(); + public static Header decode(byte[] data) { + Header obj = new Header(); int index = 0; int order; int length = data.length; @@ -66,25 +68,25 @@ public static TmHeader decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.signedHeader = SignedHeader.decode(resp.res); + obj.signedHeader = tendermint.types.SignedHeader.decode(resp.res); break; } case 2: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.validatorSet = ValidatorSet.decode(resp.res); + obj.validatorSet = tendermint.types.ValidatorSet.decode(resp.res); break; } case 3: { - Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.trustedHeight = resp.res; + obj.trustedHeight = ibc.core.client.v1.Height.decode(resp.res); break; } case 4: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.trustedValidators = ValidatorSet.decode(resp.res); + obj.trustedValidators = tendermint.types.ValidatorSet.decode(resp.res); break; } } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/Misbehaviour.java b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Misbehaviour.java similarity index 77% rename from contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/Misbehaviour.java rename to contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Misbehaviour.java index c04fbc7b2..5be2152ee 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/lightclient/v1/Misbehaviour.java +++ b/contracts/javascore/proto-lib/src/main/java/ibc/lightclients/tendermint/v1/Misbehaviour.java @@ -1,4 +1,4 @@ -package icon.proto.icon.lightclient.v1; +package ibc.lightclients.tendermint.v1; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; @@ -8,9 +8,9 @@ public class Misbehaviour extends ProtoMessage { private String clientId = ""; - private BlockUpdate header1 = new BlockUpdate(); + private Header header1 = new Header(); - private BlockUpdate header2 = new BlockUpdate(); + private Header header2 = new Header(); public String getClientId() { return this.clientId; @@ -20,19 +20,19 @@ public void setClientId(String clientId) { this.clientId = clientId; } - public BlockUpdate getHeader1() { + public Header getHeader1() { return this.header1; } - public void setHeader1(BlockUpdate header1) { + public void setHeader1(Header header1) { this.header1 = header1; } - public BlockUpdate getHeader2() { + public Header getHeader2() { return this.header2; } - public void setHeader2(BlockUpdate header2) { + public void setHeader2(Header header2) { this.header2 = header2; } @@ -61,13 +61,13 @@ public static Misbehaviour decode(byte[] data) { case 2: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.header1 = BlockUpdate.decode(resp.res); + obj.header1 = Header.decode(resp.res); break; } case 3: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.header2 = BlockUpdate.decode(resp.res); + obj.header2 = Header.decode(resp.res); break; } } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/channel/Channel.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/Channel.java similarity index 100% rename from contracts/javascore/lib/src/main/java/icon/proto/core/channel/Channel.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/Channel.java diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/channel/Packet.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/Packet.java similarity index 96% rename from contracts/javascore/lib/src/main/java/icon/proto/core/channel/Packet.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/Packet.java index 2b375362d..a4fefca2d 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/channel/Packet.java +++ b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/Packet.java @@ -20,7 +20,7 @@ public class Packet extends ProtoMessage { private byte[] data = new byte[0]; - private Height timeoutHeight = new Height(); + private Height timeoutHeight = new icon.proto.core.client.Height(); private BigInteger timeoutTimestamp = BigInteger.ZERO; @@ -148,7 +148,7 @@ public static Packet decode(byte[] data) { case 7: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.timeoutHeight = Height.decode(resp.res); + obj.timeoutHeight = icon.proto.core.client.Height.decode(resp.res); break; } case 8: { diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/channel/PacketState.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/PacketState.java similarity index 100% rename from contracts/javascore/lib/src/main/java/icon/proto/core/channel/PacketState.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/channel/PacketState.java diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/client/Height.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/client/Height.java similarity index 100% rename from contracts/javascore/lib/src/main/java/icon/proto/core/client/Height.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/client/Height.java diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/ConnectionEnd.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/ConnectionEnd.java similarity index 100% rename from contracts/javascore/lib/src/main/java/icon/proto/core/connection/ConnectionEnd.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/ConnectionEnd.java diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/Counterparty.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/Counterparty.java similarity index 89% rename from contracts/javascore/lib/src/main/java/icon/proto/core/connection/Counterparty.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/Counterparty.java index e5696aa6b..118b2b780 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/Counterparty.java +++ b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/Counterparty.java @@ -1,5 +1,6 @@ package icon.proto.core.connection; +import ibc.core.commitment.v1.MerklePrefix; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; @@ -10,7 +11,7 @@ public class Counterparty extends ProtoMessage { private String connectionId = ""; - private MerklePrefix prefix = new MerklePrefix(); + private MerklePrefix prefix = new ibc.core.commitment.v1.MerklePrefix(); public String getClientId() { return this.clientId; @@ -67,7 +68,7 @@ public static Counterparty decode(byte[] data) { case 3: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.prefix = MerklePrefix.decode(resp.res); + obj.prefix = ibc.core.commitment.v1.MerklePrefix.decode(resp.res); break; } } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/connection/Version.java b/contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/Version.java similarity index 100% rename from contracts/javascore/lib/src/main/java/icon/proto/core/connection/Version.java rename to contracts/javascore/proto-lib/src/main/java/icon/proto/core/connection/Version.java diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/DominoOp.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/DominoOp.java new file mode 100644 index 000000000..4a05aa34c --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/DominoOp.java @@ -0,0 +1,77 @@ +package tendermint.crypto; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class DominoOp extends ProtoMessage { + private String key = ""; + + private String input = ""; + + private String output = ""; + + public String getKey() { + return this.key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getInput() { + return this.input; + } + + public void setInput(String input) { + this.input = input; + } + + public String getOutput() { + return this.output; + } + + public void setOutput(String output) { + this.output = output; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.key), + Proto.encode(2, this.input), + Proto.encode(3, this.output)); + } + + public static DominoOp decode(byte[] data) { + DominoOp obj = new DominoOp(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.key = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.input = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.output = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/Proof.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/Proof.java new file mode 100644 index 000000000..3b0069731 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/Proof.java @@ -0,0 +1,96 @@ +package tendermint.crypto; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; +import java.util.List; +import scorex.util.ArrayList; + +public class Proof extends ProtoMessage { + private BigInteger total = BigInteger.ZERO; + + private BigInteger index = BigInteger.ZERO; + + private byte[] leafHash = new byte[0]; + + private List aunts = new ArrayList<>(); + + public BigInteger getTotal() { + return this.total; + } + + public void setTotal(BigInteger total) { + this.total = total; + } + + public BigInteger getIndex() { + return this.index; + } + + public void setIndex(BigInteger index) { + this.index = index; + } + + public byte[] getLeafHash() { + return this.leafHash; + } + + public void setLeafHash(byte[] leafHash) { + this.leafHash = leafHash; + } + + public List getAunts() { + return this.aunts; + } + + public void setAunts(List aunts) { + this.aunts = aunts; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.total), + Proto.encode(2, this.index), + Proto.encode(3, this.leafHash), + Proto.encodeBytesArray(4, this.aunts)); + } + + public static Proof decode(byte[] data) { + Proof obj = new Proof(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.total = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.index = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.leafHash = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.aunts.add(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOp.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOp.java new file mode 100644 index 000000000..768568b4b --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOp.java @@ -0,0 +1,77 @@ +package tendermint.crypto; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; + +public class ProofOp extends ProtoMessage { + private String type = ""; + + private byte[] key = new byte[0]; + + private byte[] data = new byte[0]; + + public String getType() { + return this.type; + } + + public void setType(String type) { + this.type = type; + } + + public byte[] getKey() { + return this.key; + } + + public void setKey(byte[] key) { + this.key = key; + } + + public byte[] getData() { + return this.data; + } + + public void setData(byte[] data) { + this.data = data; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.type), + Proto.encode(2, this.key), + Proto.encode(3, this.data)); + } + + public static ProofOp decode(byte[] data) { + ProofOp obj = new ProofOp(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.type = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.key = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.data = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleProofs.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOps.java similarity index 55% rename from contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleProofs.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOps.java index 3142316c1..260c90940 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/MerkleProofs.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ProofOps.java @@ -1,4 +1,4 @@ -package icon.proto.icon.types.v1; +package tendermint.crypto; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; @@ -6,24 +6,24 @@ import java.util.List; import scorex.util.ArrayList; -public class MerkleProofs extends ProtoMessage { - private List proofs = new ArrayList<>(); +public class ProofOps extends ProtoMessage { + private List ops = new ArrayList<>(); - public List getProofs() { - return this.proofs; + public List getOps() { + return this.ops; } - public void setProofs(List proofs) { - this.proofs = proofs; + public void setOps(List ops) { + this.ops = ops; } public byte[] encode() { return ByteUtil.join( - Proto.encodeMessageArray(1, this.proofs)); + Proto.encodeMessageArray(1, this.ops)); } - public static MerkleProofs decode(byte[] data) { - MerkleProofs obj = new MerkleProofs(); + public static ProofOps decode(byte[] data) { + ProofOps obj = new ProofOps(); int index = 0; int order; int length = data.length; @@ -34,7 +34,7 @@ public static MerkleProofs decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.proofs.add(MerkleNode.decode(resp.res)); + obj.ops.add(ProofOp.decode(resp.res)); break; } } diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PublicKey.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/PublicKey.java similarity index 72% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PublicKey.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/crypto/PublicKey.java index 1ee5bb457..8cd0ce898 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PublicKey.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/PublicKey.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.crypto; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; @@ -9,8 +9,6 @@ public class PublicKey extends ProtoMessage { private byte[] secp256k1 = new byte[0]; - private byte[] sr25519 = new byte[0]; - public byte[] getEd25519() { return this.ed25519; } @@ -27,19 +25,10 @@ public void setSecp256k1(byte[] secp256k1) { this.secp256k1 = secp256k1; } - public byte[] getSr25519() { - return this.sr25519; - } - - public void setSr25519(byte[] sr25519) { - this.sr25519 = sr25519; - } - public byte[] encode() { return ByteUtil.join( Proto.encode(1, this.ed25519), - Proto.encode(2, this.secp256k1), - Proto.encode(3, this.sr25519)); + Proto.encode(2, this.secp256k1)); } public static PublicKey decode(byte[] data) { @@ -63,12 +52,6 @@ public static PublicKey decode(byte[] data) { obj.secp256k1 = resp.res; break; } - case 3: { - Proto.DecodeResponse resp = Proto.decodeBytes(data, index); - index = resp.index; - obj.sr25519 = resp.res; - break; - } } } return obj; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ValueOp.java b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ValueOp.java new file mode 100644 index 000000000..4deb2442e --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/crypto/ValueOp.java @@ -0,0 +1,59 @@ +package tendermint.crypto; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class ValueOp extends ProtoMessage { + private byte[] key = new byte[0]; + + private Proof proof = new Proof(); + + public byte[] getKey() { + return this.key; + } + + public void setKey(byte[] key) { + this.key = key; + } + + public Proof getProof() { + return this.proof; + } + + public void setProof(Proof proof) { + this.proof = proof; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.key), + Proto.encode(2, this.proof)); + } + + public static ValueOp decode(byte[] data) { + ValueOp obj = new ValueOp(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.key = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.proof = Proof.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/ABCIParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ABCIParams.java new file mode 100644 index 000000000..49fba66ce --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ABCIParams.java @@ -0,0 +1,43 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class ABCIParams extends ProtoMessage { + private BigInteger voteExtensionsEnableHeight = BigInteger.ZERO; + + public BigInteger getVoteExtensionsEnableHeight() { + return this.voteExtensionsEnableHeight; + } + + public void setVoteExtensionsEnableHeight(BigInteger voteExtensionsEnableHeight) { + this.voteExtensionsEnableHeight = voteExtensionsEnableHeight; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.voteExtensionsEnableHeight)); + } + + public static ABCIParams decode(byte[] data) { + ABCIParams obj = new ABCIParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.voteExtensionsEnableHeight = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/Block.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Block.java new file mode 100644 index 000000000..a0c9391c3 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Block.java @@ -0,0 +1,93 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class Block extends ProtoMessage { + private Header header = new Header(); + + private Data data = new Data(); + + private EvidenceList evidence = new tendermint.types.EvidenceList(); + + private Commit lastCommit = new Commit(); + + public Header getHeader() { + return this.header; + } + + public void setHeader(Header header) { + this.header = header; + } + + public Data getData() { + return this.data; + } + + public void setData(Data data) { + this.data = data; + } + + public EvidenceList getEvidence() { + return this.evidence; + } + + public void setEvidence(EvidenceList evidence) { + this.evidence = evidence; + } + + public Commit getLastCommit() { + return this.lastCommit; + } + + public void setLastCommit(Commit lastCommit) { + this.lastCommit = lastCommit; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.header), + Proto.encode(2, this.data), + Proto.encode(3, this.evidence), + Proto.encode(4, this.lastCommit)); + } + + public static Block decode(byte[] data) { + Block obj = new Block(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.header = Header.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.data = Data.decode(resp.res); + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.evidence = tendermint.types.EvidenceList.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.lastCommit = Commit.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockID.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockID.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockID.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockID.java index 84116722c..f2695b433 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/BlockID.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockID.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BlockIDFlag.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockIDFlag.java similarity index 87% rename from contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BlockIDFlag.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockIDFlag.java index 15f6000ae..c556aa317 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/BlockIDFlag.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockIDFlag.java @@ -1,4 +1,4 @@ -package icon.proto.icon.types.v1; +package tendermint.types; public class BlockIDFlag { public static final int BLOCK_ID_FLAG_UNKNOWN = 0; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockMeta.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockMeta.java new file mode 100644 index 000000000..0ee95e8c9 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockMeta.java @@ -0,0 +1,94 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class BlockMeta extends ProtoMessage { + private BlockID blockId = new BlockID(); + + private BigInteger blockSize = BigInteger.ZERO; + + private Header header = new Header(); + + private BigInteger numTxs = BigInteger.ZERO; + + public BlockID getBlockId() { + return this.blockId; + } + + public void setBlockId(BlockID blockId) { + this.blockId = blockId; + } + + public BigInteger getBlockSize() { + return this.blockSize; + } + + public void setBlockSize(BigInteger blockSize) { + this.blockSize = blockSize; + } + + public Header getHeader() { + return this.header; + } + + public void setHeader(Header header) { + this.header = header; + } + + public BigInteger getNumTxs() { + return this.numTxs; + } + + public void setNumTxs(BigInteger numTxs) { + this.numTxs = numTxs; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.blockId), + Proto.encode(2, this.blockSize), + Proto.encode(3, this.header), + Proto.encode(4, this.numTxs)); + } + + public static BlockMeta decode(byte[] data) { + BlockMeta obj = new BlockMeta(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.blockId = BlockID.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.blockSize = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.header = Header.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.numTxs = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockParams.java new file mode 100644 index 000000000..23c166496 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/BlockParams.java @@ -0,0 +1,60 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class BlockParams extends ProtoMessage { + private BigInteger maxBytes = BigInteger.ZERO; + + private BigInteger maxGas = BigInteger.ZERO; + + public BigInteger getMaxBytes() { + return this.maxBytes; + } + + public void setMaxBytes(BigInteger maxBytes) { + this.maxBytes = maxBytes; + } + + public BigInteger getMaxGas() { + return this.maxGas; + } + + public void setMaxGas(BigInteger maxGas) { + this.maxGas = maxGas; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.maxBytes), + Proto.encode(2, this.maxGas)); + } + + public static BlockParams decode(byte[] data) { + BlockParams obj = new BlockParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.maxBytes = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.maxGas = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalBlockID.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalBlockID.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalBlockID.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalBlockID.java index 9f639a47e..b289d5eb8 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalBlockID.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalBlockID.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalPartSetHeader.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalPartSetHeader.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalPartSetHeader.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalPartSetHeader.java index cc287703b..fe403afd0 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalPartSetHeader.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalPartSetHeader.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalProposal.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalProposal.java new file mode 100644 index 000000000..ce056ef2e --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalProposal.java @@ -0,0 +1,148 @@ +package tendermint.types; + +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.Integer; +import java.lang.String; +import java.math.BigInteger; + +public class CanonicalProposal extends ProtoMessage { + private int type = 0; + + private BigInteger height = BigInteger.ZERO; + + private BigInteger round = BigInteger.ZERO; + + private BigInteger polRound = BigInteger.ZERO; + + private CanonicalBlockID blockId = new CanonicalBlockID(); + + private Timestamp timestamp = new google.protobuf.Timestamp(); + + private String chainId = ""; + + public int getType() { + return this.type; + } + + public void setType(int type) { + this.type = type; + } + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public BigInteger getRound() { + return this.round; + } + + public void setRound(BigInteger round) { + this.round = round; + } + + public BigInteger getPolRound() { + return this.polRound; + } + + public void setPolRound(BigInteger polRound) { + this.polRound = polRound; + } + + public CanonicalBlockID getBlockId() { + return this.blockId; + } + + public void setBlockId(CanonicalBlockID blockId) { + this.blockId = blockId; + } + + public Timestamp getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + + public String getChainId() { + return this.chainId; + } + + public void setChainId(String chainId) { + this.chainId = chainId; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.type), + Proto.encodeFixed64(2, this.height), + Proto.encodeFixed64(3, this.round), + Proto.encode(4, this.polRound), + Proto.encode(5, this.blockId), + Proto.encode(6, this.timestamp), + Proto.encode(7, this.chainId)); + } + + public static CanonicalProposal decode(byte[] data) { + CanonicalProposal obj = new CanonicalProposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeEnum(data, index); + index = resp.index; + obj.type = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeFixed64(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeFixed64(data, index); + index = resp.index; + obj.round = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.polRound = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.blockId = CanonicalBlockID.decode(resp.res); + break; + } + case 6: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); + break; + } + case 7: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.chainId = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalVote.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVote.java similarity index 87% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalVote.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVote.java index 559b28383..5a5afbb58 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CanonicalVote.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVote.java @@ -1,5 +1,6 @@ -package icon.proto.clients.tendermint; +package tendermint.types; +import google.protobuf.Timestamp; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; @@ -14,9 +15,9 @@ public class CanonicalVote extends ProtoMessage { private BigInteger round = BigInteger.ZERO; - private BlockID blockId = new BlockID(); + private CanonicalBlockID blockId = new CanonicalBlockID(); - private Timestamp timestamp = new Timestamp(); + private Timestamp timestamp = new google.protobuf.Timestamp(); private String chainId = ""; @@ -44,11 +45,11 @@ public void setRound(BigInteger round) { this.round = round; } - public BlockID getBlockId() { + public CanonicalBlockID getBlockId() { return this.blockId; } - public void setBlockId(BlockID blockId) { + public void setBlockId(CanonicalBlockID blockId) { this.blockId = blockId; } @@ -108,13 +109,13 @@ public static CanonicalVote decode(byte[] data) { case 4: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.blockId = BlockID.decode(resp.res); + obj.blockId = CanonicalBlockID.decode(resp.res); break; } case 5: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.timestamp = Timestamp.decode(resp.res); + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); break; } case 6: { diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVoteExtension.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVoteExtension.java new file mode 100644 index 000000000..e1b8fb73d --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CanonicalVoteExtension.java @@ -0,0 +1,95 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.math.BigInteger; + +public class CanonicalVoteExtension extends ProtoMessage { + private byte[] extension = new byte[0]; + + private BigInteger height = BigInteger.ZERO; + + private BigInteger round = BigInteger.ZERO; + + private String chainId = ""; + + public byte[] getExtension() { + return this.extension; + } + + public void setExtension(byte[] extension) { + this.extension = extension; + } + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public BigInteger getRound() { + return this.round; + } + + public void setRound(BigInteger round) { + this.round = round; + } + + public String getChainId() { + return this.chainId; + } + + public void setChainId(String chainId) { + this.chainId = chainId; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.extension), + Proto.encodeFixed64(2, this.height), + Proto.encodeFixed64(3, this.round), + Proto.encode(4, this.chainId)); + } + + public static CanonicalVoteExtension decode(byte[] data) { + CanonicalVoteExtension obj = new CanonicalVoteExtension(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extension = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeFixed64(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeFixed64(data, index); + index = resp.index; + obj.round = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.chainId = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Commit.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Commit.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Commit.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/Commit.java index 0a52c1d58..2eb510755 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Commit.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Commit.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CommitSig.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CommitSig.java similarity index 91% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CommitSig.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/CommitSig.java index b55756288..caa49cbd4 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/CommitSig.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/CommitSig.java @@ -1,5 +1,6 @@ -package icon.proto.clients.tendermint; +package tendermint.types; +import google.protobuf.Timestamp; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; @@ -10,7 +11,7 @@ public class CommitSig extends ProtoMessage { private byte[] validatorAddress = new byte[0]; - private Timestamp timestamp = new Timestamp(); + private Timestamp timestamp = new google.protobuf.Timestamp(); private byte[] signature = new byte[0]; @@ -78,7 +79,7 @@ public static CommitSig decode(byte[] data) { case 3: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.timestamp = Timestamp.decode(resp.res); + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); break; } case 4: { diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/ConsensusParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ConsensusParams.java new file mode 100644 index 000000000..7aaf3cc16 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ConsensusParams.java @@ -0,0 +1,110 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class ConsensusParams extends ProtoMessage { + private BlockParams block = new BlockParams(); + + private EvidenceParams evidence = new EvidenceParams(); + + private ValidatorParams validator = new ValidatorParams(); + + private VersionParams version = new VersionParams(); + + private ABCIParams abci = new ABCIParams(); + + public BlockParams getBlock() { + return this.block; + } + + public void setBlock(BlockParams block) { + this.block = block; + } + + public EvidenceParams getEvidence() { + return this.evidence; + } + + public void setEvidence(EvidenceParams evidence) { + this.evidence = evidence; + } + + public ValidatorParams getValidator() { + return this.validator; + } + + public void setValidator(ValidatorParams validator) { + this.validator = validator; + } + + public VersionParams getVersion() { + return this.version; + } + + public void setVersion(VersionParams version) { + this.version = version; + } + + public ABCIParams getAbci() { + return this.abci; + } + + public void setAbci(ABCIParams abci) { + this.abci = abci; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.block), + Proto.encode(2, this.evidence), + Proto.encode(3, this.validator), + Proto.encode(4, this.version), + Proto.encode(5, this.abci)); + } + + public static ConsensusParams decode(byte[] data) { + ConsensusParams obj = new ConsensusParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.block = BlockParams.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.evidence = EvidenceParams.decode(resp.res); + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.validator = ValidatorParams.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.version = VersionParams.decode(resp.res); + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.abci = ABCIParams.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/MerkleRoot.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Data.java similarity index 55% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/MerkleRoot.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/Data.java index 562bf113e..99a42b9e1 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/MerkleRoot.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Data.java @@ -1,27 +1,29 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; +import java.util.List; +import scorex.util.ArrayList; -public class MerkleRoot extends ProtoMessage { - private byte[] hash = new byte[0]; +public class Data extends ProtoMessage { + private List txs = new ArrayList<>(); - public byte[] getHash() { - return this.hash; + public List getTxs() { + return this.txs; } - public void setHash(byte[] hash) { - this.hash = hash; + public void setTxs(List txs) { + this.txs = txs; } public byte[] encode() { return ByteUtil.join( - Proto.encode(1, this.hash)); + Proto.encodeBytesArray(1, this.txs)); } - public static MerkleRoot decode(byte[] data) { - MerkleRoot obj = new MerkleRoot(); + public static Data decode(byte[] data) { + Data obj = new Data(); int index = 0; int order; int length = data.length; @@ -32,7 +34,7 @@ public static MerkleRoot decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.hash = resp.res; + obj.txs.add(resp.res); break; } } diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/DuplicateVoteEvidence.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/DuplicateVoteEvidence.java new file mode 100644 index 000000000..aa6573f66 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/DuplicateVoteEvidence.java @@ -0,0 +1,112 @@ +package tendermint.types; + +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class DuplicateVoteEvidence extends ProtoMessage { + private Vote voteA = new tendermint.types.Vote(); + + private Vote voteB = new tendermint.types.Vote(); + + private BigInteger totalVotingPower = BigInteger.ZERO; + + private BigInteger validatorPower = BigInteger.ZERO; + + private Timestamp timestamp = new google.protobuf.Timestamp(); + + public Vote getVoteA() { + return this.voteA; + } + + public void setVoteA(Vote voteA) { + this.voteA = voteA; + } + + public Vote getVoteB() { + return this.voteB; + } + + public void setVoteB(Vote voteB) { + this.voteB = voteB; + } + + public BigInteger getTotalVotingPower() { + return this.totalVotingPower; + } + + public void setTotalVotingPower(BigInteger totalVotingPower) { + this.totalVotingPower = totalVotingPower; + } + + public BigInteger getValidatorPower() { + return this.validatorPower; + } + + public void setValidatorPower(BigInteger validatorPower) { + this.validatorPower = validatorPower; + } + + public Timestamp getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.voteA), + Proto.encode(2, this.voteB), + Proto.encode(3, this.totalVotingPower), + Proto.encode(4, this.validatorPower), + Proto.encode(5, this.timestamp)); + } + + public static DuplicateVoteEvidence decode(byte[] data) { + DuplicateVoteEvidence obj = new DuplicateVoteEvidence(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.voteA = tendermint.types.Vote.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.voteB = tendermint.types.Vote.decode(resp.res); + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.totalVotingPower = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.validatorPower = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/EventDataRoundState.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EventDataRoundState.java new file mode 100644 index 000000000..74383d6c9 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EventDataRoundState.java @@ -0,0 +1,78 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.math.BigInteger; + +public class EventDataRoundState extends ProtoMessage { + private BigInteger height = BigInteger.ZERO; + + private BigInteger round = BigInteger.ZERO; + + private String step = ""; + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public BigInteger getRound() { + return this.round; + } + + public void setRound(BigInteger round) { + this.round = round; + } + + public String getStep() { + return this.step; + } + + public void setStep(String step) { + this.step = step; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.height), + Proto.encode(2, this.round), + Proto.encode(3, this.step)); + } + + public static EventDataRoundState decode(byte[] data) { + EventDataRoundState obj = new EventDataRoundState(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.round = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.step = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/Evidence.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Evidence.java new file mode 100644 index 000000000..77207e347 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Evidence.java @@ -0,0 +1,59 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class Evidence extends ProtoMessage { + private DuplicateVoteEvidence duplicateVoteEvidence = new DuplicateVoteEvidence(); + + private LightClientAttackEvidence lightClientAttackEvidence = new LightClientAttackEvidence(); + + public DuplicateVoteEvidence getDuplicateVoteEvidence() { + return this.duplicateVoteEvidence; + } + + public void setDuplicateVoteEvidence(DuplicateVoteEvidence duplicateVoteEvidence) { + this.duplicateVoteEvidence = duplicateVoteEvidence; + } + + public LightClientAttackEvidence getLightClientAttackEvidence() { + return this.lightClientAttackEvidence; + } + + public void setLightClientAttackEvidence(LightClientAttackEvidence lightClientAttackEvidence) { + this.lightClientAttackEvidence = lightClientAttackEvidence; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.duplicateVoteEvidence), + Proto.encode(2, this.lightClientAttackEvidence)); + } + + public static Evidence decode(byte[] data) { + Evidence obj = new Evidence(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.duplicateVoteEvidence = DuplicateVoteEvidence.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.lightClientAttackEvidence = LightClientAttackEvidence.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePrefix.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceList.java similarity index 50% rename from contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePrefix.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceList.java index 13af209cb..5dc5a1798 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/core/commitment/MerklePrefix.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceList.java @@ -1,27 +1,29 @@ -package icon.proto.core.commitment; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; +import java.util.List; +import scorex.util.ArrayList; -public class MerklePrefix extends ProtoMessage { - private byte[] keyPrefix = new byte[0]; +public class EvidenceList extends ProtoMessage { + private List evidence = new ArrayList<>(); - public byte[] getKeyPrefix() { - return this.keyPrefix; + public List getEvidence() { + return this.evidence; } - public void setKeyPrefix(byte[] keyPrefix) { - this.keyPrefix = keyPrefix; + public void setEvidence(List evidence) { + this.evidence = evidence; } public byte[] encode() { return ByteUtil.join( - Proto.encode(1, this.keyPrefix)); + Proto.encodeMessageArray(1, this.evidence)); } - public static MerklePrefix decode(byte[] data) { - MerklePrefix obj = new MerklePrefix(); + public static EvidenceList decode(byte[] data) { + EvidenceList obj = new EvidenceList(); int index = 0; int order; int length = data.length; @@ -32,7 +34,7 @@ public static MerklePrefix decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.keyPrefix = resp.res; + obj.evidence.add(Evidence.decode(resp.res)); break; } } diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceParams.java new file mode 100644 index 000000000..5048ecea0 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/EvidenceParams.java @@ -0,0 +1,78 @@ +package tendermint.types; + +import google.protobuf.Duration; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class EvidenceParams extends ProtoMessage { + private BigInteger maxAgeNumBlocks = BigInteger.ZERO; + + private Duration maxAgeDuration = new google.protobuf.Duration(); + + private BigInteger maxBytes = BigInteger.ZERO; + + public BigInteger getMaxAgeNumBlocks() { + return this.maxAgeNumBlocks; + } + + public void setMaxAgeNumBlocks(BigInteger maxAgeNumBlocks) { + this.maxAgeNumBlocks = maxAgeNumBlocks; + } + + public Duration getMaxAgeDuration() { + return this.maxAgeDuration; + } + + public void setMaxAgeDuration(Duration maxAgeDuration) { + this.maxAgeDuration = maxAgeDuration; + } + + public BigInteger getMaxBytes() { + return this.maxBytes; + } + + public void setMaxBytes(BigInteger maxBytes) { + this.maxBytes = maxBytes; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.maxAgeNumBlocks), + Proto.encode(2, this.maxAgeDuration), + Proto.encode(3, this.maxBytes)); + } + + public static EvidenceParams decode(byte[] data) { + EvidenceParams obj = new EvidenceParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.maxAgeNumBlocks = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.maxAgeDuration = google.protobuf.Duration.decode(resp.res); + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.maxBytes = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommit.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommit.java new file mode 100644 index 000000000..f7676988c --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommit.java @@ -0,0 +1,96 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; +import java.util.List; +import scorex.util.ArrayList; + +public class ExtendedCommit extends ProtoMessage { + private BigInteger height = BigInteger.ZERO; + + private BigInteger round = BigInteger.ZERO; + + private BlockID blockId = new BlockID(); + + private List extendedSignatures = new ArrayList<>(); + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public BigInteger getRound() { + return this.round; + } + + public void setRound(BigInteger round) { + this.round = round; + } + + public BlockID getBlockId() { + return this.blockId; + } + + public void setBlockId(BlockID blockId) { + this.blockId = blockId; + } + + public List getExtendedSignatures() { + return this.extendedSignatures; + } + + public void setExtendedSignatures(List extendedSignatures) { + this.extendedSignatures = extendedSignatures; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.height), + Proto.encode(2, this.round), + Proto.encode(3, this.blockId), + Proto.encodeMessageArray(4, this.extendedSignatures)); + } + + public static ExtendedCommit decode(byte[] data) { + ExtendedCommit obj = new ExtendedCommit(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.round = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.blockId = BlockID.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extendedSignatures.add(ExtendedCommitSig.decode(resp.res)); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommitSig.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommitSig.java new file mode 100644 index 000000000..d5848ca54 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ExtendedCommitSig.java @@ -0,0 +1,129 @@ +package tendermint.types; + +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.Integer; + +public class ExtendedCommitSig extends ProtoMessage { + private int blockIdFlag = 0; + + private byte[] validatorAddress = new byte[0]; + + private Timestamp timestamp = new google.protobuf.Timestamp(); + + private byte[] signature = new byte[0]; + + private byte[] extension = new byte[0]; + + private byte[] extensionSignature = new byte[0]; + + public int getBlockIdFlag() { + return this.blockIdFlag; + } + + public void setBlockIdFlag(int blockIdFlag) { + this.blockIdFlag = blockIdFlag; + } + + public byte[] getValidatorAddress() { + return this.validatorAddress; + } + + public void setValidatorAddress(byte[] validatorAddress) { + this.validatorAddress = validatorAddress; + } + + public Timestamp getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + + public byte[] getSignature() { + return this.signature; + } + + public void setSignature(byte[] signature) { + this.signature = signature; + } + + public byte[] getExtension() { + return this.extension; + } + + public void setExtension(byte[] extension) { + this.extension = extension; + } + + public byte[] getExtensionSignature() { + return this.extensionSignature; + } + + public void setExtensionSignature(byte[] extensionSignature) { + this.extensionSignature = extensionSignature; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.blockIdFlag), + Proto.encode(2, this.validatorAddress), + Proto.encode(3, this.timestamp), + Proto.encode(4, this.signature), + Proto.encode(5, this.extension), + Proto.encode(6, this.extensionSignature)); + } + + public static ExtendedCommitSig decode(byte[] data) { + ExtendedCommitSig obj = new ExtendedCommitSig(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeEnum(data, index); + index = resp.index; + obj.blockIdFlag = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.validatorAddress = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.signature = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extension = resp.res; + break; + } + case 6: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extensionSignature = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/HashedParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/HashedParams.java new file mode 100644 index 000000000..32aeb16bb --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/HashedParams.java @@ -0,0 +1,60 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class HashedParams extends ProtoMessage { + private BigInteger blockMaxBytes = BigInteger.ZERO; + + private BigInteger blockMaxGas = BigInteger.ZERO; + + public BigInteger getBlockMaxBytes() { + return this.blockMaxBytes; + } + + public void setBlockMaxBytes(BigInteger blockMaxBytes) { + this.blockMaxBytes = blockMaxBytes; + } + + public BigInteger getBlockMaxGas() { + return this.blockMaxGas; + } + + public void setBlockMaxGas(BigInteger blockMaxGas) { + this.blockMaxGas = blockMaxGas; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.blockMaxBytes), + Proto.encode(2, this.blockMaxGas)); + } + + public static HashedParams decode(byte[] data) { + HashedParams obj = new HashedParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.blockMaxBytes = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.blockMaxGas = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/LightHeader.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Header.java similarity index 93% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/LightHeader.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/Header.java index 5dbae16e9..7f4973998 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/LightHeader.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Header.java @@ -1,19 +1,21 @@ -package icon.proto.clients.tendermint; +package tendermint.types; +import google.protobuf.Timestamp; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; import java.lang.String; import java.math.BigInteger; +import tendermint.version.Consensus; -public class LightHeader extends ProtoMessage { - private Consensus version = new Consensus(); +public class Header extends ProtoMessage { + private Consensus version = new tendermint.version.Consensus(); private String chainId = ""; private BigInteger height = BigInteger.ZERO; - private Timestamp time = new Timestamp(); + private Timestamp time = new google.protobuf.Timestamp(); private BlockID lastBlockId = new BlockID(); @@ -165,8 +167,8 @@ public byte[] encode() { Proto.encode(14, this.proposerAddress)); } - public static LightHeader decode(byte[] data) { - LightHeader obj = new LightHeader(); + public static Header decode(byte[] data) { + Header obj = new Header(); int index = 0; int order; int length = data.length; @@ -177,7 +179,7 @@ public static LightHeader decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.version = Consensus.decode(resp.res); + obj.version = tendermint.version.Consensus.decode(resp.res); break; } case 2: { @@ -195,7 +197,7 @@ public static LightHeader decode(byte[] data) { case 4: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.time = Timestamp.decode(resp.res); + obj.time = google.protobuf.Timestamp.decode(resp.res); break; } case 5: { diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightBlock.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightBlock.java new file mode 100644 index 000000000..1f50317b7 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightBlock.java @@ -0,0 +1,59 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; + +public class LightBlock extends ProtoMessage { + private SignedHeader signedHeader = new SignedHeader(); + + private ValidatorSet validatorSet = new tendermint.types.ValidatorSet(); + + public SignedHeader getSignedHeader() { + return this.signedHeader; + } + + public void setSignedHeader(SignedHeader signedHeader) { + this.signedHeader = signedHeader; + } + + public ValidatorSet getValidatorSet() { + return this.validatorSet; + } + + public void setValidatorSet(ValidatorSet validatorSet) { + this.validatorSet = validatorSet; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.signedHeader), + Proto.encode(2, this.validatorSet)); + } + + public static LightBlock decode(byte[] data) { + LightBlock obj = new LightBlock(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.signedHeader = SignedHeader.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.validatorSet = tendermint.types.ValidatorSet.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightClientAttackEvidence.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightClientAttackEvidence.java new file mode 100644 index 000000000..91c7adb97 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/LightClientAttackEvidence.java @@ -0,0 +1,114 @@ +package tendermint.types; + +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; +import java.util.List; +import scorex.util.ArrayList; + +public class LightClientAttackEvidence extends ProtoMessage { + private LightBlock conflictingBlock = new tendermint.types.LightBlock(); + + private BigInteger commonHeight = BigInteger.ZERO; + + private List byzantineValidators = new ArrayList<>(); + + private BigInteger totalVotingPower = BigInteger.ZERO; + + private Timestamp timestamp = new google.protobuf.Timestamp(); + + public LightBlock getConflictingBlock() { + return this.conflictingBlock; + } + + public void setConflictingBlock(LightBlock conflictingBlock) { + this.conflictingBlock = conflictingBlock; + } + + public BigInteger getCommonHeight() { + return this.commonHeight; + } + + public void setCommonHeight(BigInteger commonHeight) { + this.commonHeight = commonHeight; + } + + public List getByzantineValidators() { + return this.byzantineValidators; + } + + public void setByzantineValidators(List byzantineValidators) { + this.byzantineValidators = byzantineValidators; + } + + public BigInteger getTotalVotingPower() { + return this.totalVotingPower; + } + + public void setTotalVotingPower(BigInteger totalVotingPower) { + this.totalVotingPower = totalVotingPower; + } + + public Timestamp getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.conflictingBlock), + Proto.encode(2, this.commonHeight), + Proto.encodeMessageArray(3, this.byzantineValidators), + Proto.encode(4, this.totalVotingPower), + Proto.encode(5, this.timestamp)); + } + + public static LightClientAttackEvidence decode(byte[] data) { + LightClientAttackEvidence obj = new LightClientAttackEvidence(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.conflictingBlock = tendermint.types.LightBlock.decode(resp.res); + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.commonHeight = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.byzantineValidators.add(tendermint.types.Validator.decode(resp.res)); + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.totalVotingPower = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/Part.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Part.java new file mode 100644 index 000000000..861ec4515 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Part.java @@ -0,0 +1,78 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; +import tendermint.crypto.Proof; + +public class Part extends ProtoMessage { + private BigInteger index = BigInteger.ZERO; + + private byte[] bytes = new byte[0]; + + private Proof proof = new tendermint.crypto.Proof(); + + public BigInteger getIndex() { + return this.index; + } + + public void setIndex(BigInteger index) { + this.index = index; + } + + public byte[] getBytes() { + return this.bytes; + } + + public void setBytes(byte[] bytes) { + this.bytes = bytes; + } + + public Proof getProof() { + return this.proof; + } + + public void setProof(Proof proof) { + this.proof = proof; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.index), + Proto.encode(2, this.bytes), + Proto.encode(3, this.proof)); + } + + public static Part decode(byte[] data) { + Part obj = new Part(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.index = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.bytes = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.proof = tendermint.crypto.Proof.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PartSetHeader.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/PartSetHeader.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PartSetHeader.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/PartSetHeader.java index 919b02c28..5a4da6a91 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/PartSetHeader.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/PartSetHeader.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/Proposal.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Proposal.java new file mode 100644 index 000000000..76829fbf9 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Proposal.java @@ -0,0 +1,147 @@ +package tendermint.types; + +import google.protobuf.Timestamp; +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.Integer; +import java.math.BigInteger; + +public class Proposal extends ProtoMessage { + private int type = 0; + + private BigInteger height = BigInteger.ZERO; + + private BigInteger round = BigInteger.ZERO; + + private BigInteger polRound = BigInteger.ZERO; + + private BlockID blockId = new BlockID(); + + private Timestamp timestamp = new google.protobuf.Timestamp(); + + private byte[] signature = new byte[0]; + + public int getType() { + return this.type; + } + + public void setType(int type) { + this.type = type; + } + + public BigInteger getHeight() { + return this.height; + } + + public void setHeight(BigInteger height) { + this.height = height; + } + + public BigInteger getRound() { + return this.round; + } + + public void setRound(BigInteger round) { + this.round = round; + } + + public BigInteger getPolRound() { + return this.polRound; + } + + public void setPolRound(BigInteger polRound) { + this.polRound = polRound; + } + + public BlockID getBlockId() { + return this.blockId; + } + + public void setBlockId(BlockID blockId) { + this.blockId = blockId; + } + + public Timestamp getTimestamp() { + return this.timestamp; + } + + public void setTimestamp(Timestamp timestamp) { + this.timestamp = timestamp; + } + + public byte[] getSignature() { + return this.signature; + } + + public void setSignature(byte[] signature) { + this.signature = signature; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.type), + Proto.encode(2, this.height), + Proto.encode(3, this.round), + Proto.encode(4, this.polRound), + Proto.encode(5, this.blockId), + Proto.encode(6, this.timestamp), + Proto.encode(7, this.signature)); + } + + public static Proposal decode(byte[] data) { + Proposal obj = new Proposal(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeEnum(data, index); + index = resp.index; + obj.type = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.height = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.round = resp.res; + break; + } + case 4: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.polRound = resp.res; + break; + } + case 5: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.blockId = BlockID.decode(resp.res); + break; + } + case 6: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); + break; + } + case 7: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.signature = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedHeader.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedHeader.java similarity index 84% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedHeader.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedHeader.java index b3ef2c33a..7f99bafb3 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SignedHeader.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedHeader.java @@ -1,19 +1,19 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; public class SignedHeader extends ProtoMessage { - private LightHeader header = new LightHeader(); + private Header header = new Header(); private Commit commit = new Commit(); - public LightHeader getHeader() { + public Header getHeader() { return this.header; } - public void setHeader(LightHeader header) { + public void setHeader(Header header) { this.header = header; } @@ -43,7 +43,7 @@ public static SignedHeader decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.header = LightHeader.decode(resp.res); + obj.header = Header.decode(resp.res); break; } case 2: { diff --git a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedMsgType.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedMsgType.java similarity index 88% rename from contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedMsgType.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedMsgType.java index 252482627..0681c8d8b 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/icon/types/v1/SignedMsgType.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SignedMsgType.java @@ -1,4 +1,4 @@ -package icon.proto.icon.types.v1; +package tendermint.types; public class SignedMsgType { public static final int SIGNED_MSG_TYPE_UNKNOWN = 0; diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SimpleValidator.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SimpleValidator.java similarity index 87% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SimpleValidator.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/SimpleValidator.java index d832d5e02..3b3ace0fb 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/SimpleValidator.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/SimpleValidator.java @@ -1,12 +1,13 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; import java.math.BigInteger; +import tendermint.crypto.PublicKey; public class SimpleValidator extends ProtoMessage { - private PublicKey pubKey = new PublicKey(); + private PublicKey pubKey = new tendermint.crypto.PublicKey(); private BigInteger votingPower = BigInteger.ZERO; @@ -44,7 +45,7 @@ public static SimpleValidator decode(byte[] data) { case 1: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.pubKey = PublicKey.decode(resp.res); + obj.pubKey = tendermint.crypto.PublicKey.decode(resp.res); break; } case 2: { diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/TxProof.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/TxProof.java new file mode 100644 index 000000000..49f66c343 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/TxProof.java @@ -0,0 +1,77 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import tendermint.crypto.Proof; + +public class TxProof extends ProtoMessage { + private byte[] rootHash = new byte[0]; + + private byte[] data = new byte[0]; + + private Proof proof = new tendermint.crypto.Proof(); + + public byte[] getRootHash() { + return this.rootHash; + } + + public void setRootHash(byte[] rootHash) { + this.rootHash = rootHash; + } + + public byte[] getData() { + return this.data; + } + + public void setData(byte[] data) { + this.data = data; + } + + public Proof getProof() { + return this.proof; + } + + public void setProof(Proof proof) { + this.proof = proof; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.rootHash), + Proto.encode(2, this.data), + Proto.encode(3, this.proof)); + } + + public static TxProof decode(byte[] data) { + TxProof obj = new TxProof(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.rootHash = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.data = resp.res; + break; + } + case 3: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.proof = tendermint.crypto.Proof.decode(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Validator.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Validator.java similarity index 91% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Validator.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/Validator.java index 8524099ae..26a7e1164 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Validator.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Validator.java @@ -1,14 +1,15 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; import java.math.BigInteger; +import tendermint.crypto.PublicKey; public class Validator extends ProtoMessage { private byte[] address = new byte[0]; - private PublicKey pubKey = new PublicKey(); + private PublicKey pubKey = new tendermint.crypto.PublicKey(); private BigInteger votingPower = BigInteger.ZERO; @@ -72,7 +73,7 @@ public static Validator decode(byte[] data) { case 2: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.pubKey = PublicKey.decode(resp.res); + obj.pubKey = tendermint.crypto.PublicKey.decode(resp.res); break; } case 3: { diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorParams.java new file mode 100644 index 000000000..c14421991 --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorParams.java @@ -0,0 +1,45 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.util.List; +import scorex.util.ArrayList; + +public class ValidatorParams extends ProtoMessage { + private List pubKeyTypes = new ArrayList<>(); + + public List getPubKeyTypes() { + return this.pubKeyTypes; + } + + public void setPubKeyTypes(List pubKeyTypes) { + this.pubKeyTypes = pubKeyTypes; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encodeStringArray(1, this.pubKeyTypes)); + } + + public static ValidatorParams decode(byte[] data) { + ValidatorParams obj = new ValidatorParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.pubKeyTypes.add(resp.res); + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ValidatorSet.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorSet.java similarity index 98% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ValidatorSet.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorSet.java index 323e57cda..0ddbb09a4 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/ValidatorSet.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/ValidatorSet.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.types; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/types/VersionParams.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/VersionParams.java new file mode 100644 index 000000000..a35a0fc1b --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/VersionParams.java @@ -0,0 +1,43 @@ +package tendermint.types; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.math.BigInteger; + +public class VersionParams extends ProtoMessage { + private BigInteger app = BigInteger.ZERO; + + public BigInteger getApp() { + return this.app; + } + + public void setApp(BigInteger app) { + this.app = app; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.app)); + } + + public static VersionParams decode(byte[] data) { + VersionParams obj = new VersionParams(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.app = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Vote.java b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Vote.java similarity index 76% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Vote.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/types/Vote.java index 5894f89f2..10f48370d 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Vote.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/types/Vote.java @@ -1,5 +1,6 @@ -package icon.proto.clients.tendermint; +package tendermint.types; +import google.protobuf.Timestamp; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; import ibc.icon.score.util.ProtoMessage; @@ -15,7 +16,7 @@ public class Vote extends ProtoMessage { private BlockID blockId = new BlockID(); - private Timestamp timestamp = new Timestamp(); + private Timestamp timestamp = new google.protobuf.Timestamp(); private byte[] validatorAddress = new byte[0]; @@ -23,6 +24,10 @@ public class Vote extends ProtoMessage { private byte[] signature = new byte[0]; + private byte[] extension = new byte[0]; + + private byte[] extensionSignature = new byte[0]; + public int getType() { return this.type; } @@ -87,6 +92,22 @@ public void setSignature(byte[] signature) { this.signature = signature; } + public byte[] getExtension() { + return this.extension; + } + + public void setExtension(byte[] extension) { + this.extension = extension; + } + + public byte[] getExtensionSignature() { + return this.extensionSignature; + } + + public void setExtensionSignature(byte[] extensionSignature) { + this.extensionSignature = extensionSignature; + } + public byte[] encode() { return ByteUtil.join( Proto.encode(1, this.type), @@ -96,7 +117,9 @@ public byte[] encode() { Proto.encode(5, this.timestamp), Proto.encode(6, this.validatorAddress), Proto.encode(7, this.validatorIndex), - Proto.encode(8, this.signature)); + Proto.encode(8, this.signature), + Proto.encode(9, this.extension), + Proto.encode(10, this.extensionSignature)); } public static Vote decode(byte[] data) { @@ -135,7 +158,7 @@ public static Vote decode(byte[] data) { case 5: { Proto.DecodeResponse resp = Proto.decodeBytes(data, index); index = resp.index; - obj.timestamp = Timestamp.decode(resp.res); + obj.timestamp = google.protobuf.Timestamp.decode(resp.res); break; } case 6: { @@ -156,6 +179,18 @@ public static Vote decode(byte[] data) { obj.signature = resp.res; break; } + case 9: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extension = resp.res; + break; + } + case 10: { + Proto.DecodeResponse resp = Proto.decodeBytes(data, index); + index = resp.index; + obj.extensionSignature = resp.res; + break; + } } } return obj; diff --git a/contracts/javascore/proto-lib/src/main/java/tendermint/version/App.java b/contracts/javascore/proto-lib/src/main/java/tendermint/version/App.java new file mode 100644 index 000000000..306cd3d2b --- /dev/null +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/version/App.java @@ -0,0 +1,61 @@ +package tendermint.version; + +import ibc.icon.score.util.ByteUtil; +import ibc.icon.score.util.Proto; +import ibc.icon.score.util.ProtoMessage; +import java.lang.String; +import java.math.BigInteger; + +public class App extends ProtoMessage { + private BigInteger protocol = BigInteger.ZERO; + + private String software = ""; + + public BigInteger getProtocol() { + return this.protocol; + } + + public void setProtocol(BigInteger protocol) { + this.protocol = protocol; + } + + public String getSoftware() { + return this.software; + } + + public void setSoftware(String software) { + this.software = software; + } + + public byte[] encode() { + return ByteUtil.join( + Proto.encode(1, this.protocol), + Proto.encode(2, this.software)); + } + + public static App decode(byte[] data) { + App obj = new App(); + int index = 0; + int order; + int length = data.length; + while (index < length) { + order = data[index] >> 3; + index++; + switch(order) { + case 1: { + Proto.DecodeResponse resp = Proto.decodeVarInt(data, index); + index = resp.index; + obj.protocol = resp.res; + break; + } + case 2: { + Proto.DecodeResponse resp = Proto.decodeString(data, index); + index = resp.index; + obj.software = resp.res; + break; + } + } + } + return obj; + } +} diff --git a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Consensus.java b/contracts/javascore/proto-lib/src/main/java/tendermint/version/Consensus.java similarity index 97% rename from contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Consensus.java rename to contracts/javascore/proto-lib/src/main/java/tendermint/version/Consensus.java index 86a7bc394..b870afb24 100644 --- a/contracts/javascore/lib/src/main/java/icon/proto/clients/tendermint/Consensus.java +++ b/contracts/javascore/proto-lib/src/main/java/tendermint/version/Consensus.java @@ -1,4 +1,4 @@ -package icon.proto.clients.tendermint; +package tendermint.version; import ibc.icon.score.util.ByteUtil; import ibc.icon.score.util.Proto; diff --git a/contracts/javascore/proto-util/src/main/java/icon/score/proto/ProtoGen.java b/contracts/javascore/proto-util/src/main/java/icon/score/proto/ProtoGen.java index 81fe7acaa..f02e15f54 100644 --- a/contracts/javascore/proto-util/src/main/java/icon/score/proto/ProtoGen.java +++ b/contracts/javascore/proto-util/src/main/java/icon/score/proto/ProtoGen.java @@ -35,11 +35,7 @@ import org.apache.commons.io.FileUtils; public class ProtoGen { - - private static final String basePackage = "icon.proto"; - - public static void main(String[] args) { - try { + public static void main(String[] args) throws Exception { String path = "../../../proto"; final Injector injector = Guice.createInjector(new ParserModule()); @@ -52,41 +48,57 @@ public static void main(String[] args) { Iterator it = FileUtils.iterateFiles(new File(path), new String[]{"proto"}, true); + while (it.hasNext()) { File file = it.next(); String filePath = file.getPath().replace(path + "/", ""); - final ProtoContext protoContext = importer.importFile(fileReader, filePath); - final Proto proto = protoContext.getProto(); - - String targetPath = "build/generated/sources"; - String relativePath = filePath.replace("/" + file.getName(), ""); - String targetPackage = basePackage + "." + relativePath.replace("/", "."); - targetPackage = targetPackage.replaceAll("[0-9]+-", ""); + if (!( + filePath.startsWith("ibc/lightclients/tendermint") || + filePath.startsWith("tendermint/types") || + filePath.startsWith("core") + )) { + continue; + } + try { + final ProtoContext protoContext = importer.importFile(fileReader, filePath); + generate(protoContext); + } catch (Exception e) { + System.out.println("Failed to generate proto: " + e); + } - final List enums = proto.getEnums(); - for (io.protostuff.compiler.model.Enum _enum : enums) { - JavaFile javaFile = JavaFile.builder(targetPackage, createEnum(_enum).build()) - .build(); + } + } - javaFile.writeTo(new File(targetPath)); - } + private static void generate(ProtoContext protoContext ) { + try { - final List messages = proto.getMessages(); - for (Message message : messages) { + final Proto proto = protoContext.getProto(); + for (ProtoContext ctx : protoContext.getImports()) { + generate(ctx); + } + String targetPath = "build/generated/sources"; + System.out.println(proto.getPackage().toString()); + System.out.println(proto.getCanonicalName()); + final List enums = proto.getEnums(); + for (io.protostuff.compiler.model.Enum _enum : enums) { + JavaFile javaFile = JavaFile.builder(proto.getPackage().toString(), createEnum(_enum).build()) + .build(); + + javaFile.writeTo(new File(targetPath)); + } - JavaFile javaFile = JavaFile.builder(targetPackage, createMessage(message).build()) - .build(); + final List messages = proto.getMessages(); + for (Message message : messages) { - javaFile.writeTo(new File(targetPath)); + JavaFile javaFile = JavaFile.builder(proto.getPackage().toString(), createMessage(message).build()) + .build(); - } + javaFile.writeTo(new File(targetPath)); } - } catch (Exception e) { System.out.println("Failed to generate proto: " + e); } } - private static TypeSpec.Builder createEnum(io.protostuff.compiler.model.Enum protoEnum) { TypeSpec.Builder enumSpec = TypeSpec.classBuilder(protoEnum.getName()) .addModifiers(Modifier.PUBLIC); @@ -253,6 +265,7 @@ private static FieldSpec generateFieldSpec(Field field) { } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": @@ -285,6 +298,7 @@ private static String getDecoder(Field field) { } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": @@ -319,6 +333,7 @@ private static String getEncoder(Field field) { } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": @@ -349,12 +364,14 @@ private static String getArrayEncoder(Field field) { } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": case "uint64": case "sint32": case "sint64": + case "ScalarType": return "encodeVarIntArray"; case "fixed32": case "sfixed32": @@ -375,14 +392,16 @@ private static String getArrayEncoder(Field field) { private static TypeName getTypeName(Field field) { if (field.getType().isMessage()) { + return ClassName.bestGuess(field.getTypeName()); } - if (field.getType().isEnum()) { + if (field.getType().isEnum() && !field.isRepeated()) { return TypeName.INT; } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": @@ -393,6 +412,7 @@ private static TypeName getTypeName(Field field) { case "fixed64": case "sfixed32": case "sfixed64": + case "ScalarType": return ClassName.get(BigInteger.class); case "bool": return TypeName.BOOLEAN; @@ -415,6 +435,7 @@ private static TypeName getDecoderResponseType(Field field) { } switch (field.getTypeName()) { + case "int": case "int32": case "int64": case "uint32": diff --git a/contracts/javascore/score-util/src/main/java/ibc/icon/score/util/Proto.java b/contracts/javascore/score-util/src/main/java/ibc/icon/score/util/Proto.java index 6d3014796..b1d0a96d4 100644 --- a/contracts/javascore/score-util/src/main/java/ibc/icon/score/util/Proto.java +++ b/contracts/javascore/score-util/src/main/java/ibc/icon/score/util/Proto.java @@ -179,7 +179,7 @@ public static byte[] encodeVarIntArray(int order, List items) { encodedItems[0] = new byte[]{(byte) (order << 3 | 2)}; int size = 0; for (int i = 0; i < length; i++) { - byte[] val = encodeVarInt(items.get(i)); + byte[] val = encodeVarIntRaw(items.get(i)); encodedItems[i + 2] = val; size = size + val.length; } @@ -188,6 +188,28 @@ public static byte[] encodeVarIntArray(int order, List items) { return ByteUtil.join(encodedItems); } + public static byte[] encodeVarIntRaw(BigInteger item) { + + int size = estimateVarIntSize(item); + + byte[] res = new byte[size]; + int index = 0; + long value = item.longValue(); + + while (true) { + if ((value & ~0x7FL) == 0) { + res[index] = (byte) value; + break; + } else { + res[index] = (byte) (((int) value & 0x7F) | 0x80); + value >>>= 7; + index++; + } + } + return res; + } + + public static DecodeResponse> decodeVarIntArray(byte[] data, int index) { DecodeResponse> response = new DecodeResponse<>(); response.res = new ArrayList<>(); diff --git a/contracts/javascore/settings.gradle b/contracts/javascore/settings.gradle index c3b35a630..d669e3543 100644 --- a/contracts/javascore/settings.gradle +++ b/contracts/javascore/settings.gradle @@ -2,6 +2,7 @@ rootProject.name = 'javascore' include( 'score-util', 'proto-util', + 'proto-lib', 'lib', 'test-lib', 'ibc', diff --git a/contracts/javascore/xcall-connection/build.gradle b/contracts/javascore/xcall-connection/build.gradle index ecd9347e3..9e8ce6466 100644 --- a/contracts/javascore/xcall-connection/build.gradle +++ b/contracts/javascore/xcall-connection/build.gradle @@ -3,6 +3,7 @@ version = '0.1.0' dependencies { implementation group: 'xyz.venture23', name: 'xcall-lib', version: '0.1.1' implementation project(':lib') + implementation project(':proto-lib') implementation project(':score-util') testImplementation project(':test-lib') } @@ -24,6 +25,7 @@ jacocoTestReport { optimizedJar { dependsOn(project(':lib').jar) + dependsOn(project(':proto-lib').jar) dependsOn(project(':score-util').jar) mainClassName = 'ibc.xcall.connection.IBCConnection' from { diff --git a/contracts/javascore/xcall-connection/src/main/java/ibc/xcall/connection/IBCConnection.java b/contracts/javascore/xcall-connection/src/main/java/ibc/xcall/connection/IBCConnection.java index baed21b2c..7deab166c 100644 --- a/contracts/javascore/xcall-connection/src/main/java/ibc/xcall/connection/IBCConnection.java +++ b/contracts/javascore/xcall-connection/src/main/java/ibc/xcall/connection/IBCConnection.java @@ -20,9 +20,9 @@ import java.math.BigInteger; import java.util.Map; +import icon.proto.core.channel.Packet; import icon.proto.core.channel.Channel.Counterparty; import icon.proto.core.channel.Channel.Order; -import icon.proto.core.channel.Packet; import icon.proto.core.client.Height; import score.Address; import score.BranchDB; diff --git a/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTest.java b/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTest.java index 740bd7a54..0b2930826 100644 --- a/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTest.java +++ b/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTest.java @@ -12,9 +12,9 @@ import com.iconloop.score.test.Account; import com.iconloop.score.test.ServiceManager; -import ibc.icon.score.util.StringUtil; import icon.proto.core.channel.Packet; import icon.proto.core.client.Height; +import ibc.icon.score.util.StringUtil; import java.math.BigInteger; import java.util.Map; diff --git a/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTestBase.java b/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTestBase.java index 27c785e40..e2fbb5050 100644 --- a/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTestBase.java +++ b/contracts/javascore/xcall-connection/src/test/java/ibc/xcall/connection/IBCConnectionTestBase.java @@ -9,10 +9,10 @@ import com.iconloop.score.test.ServiceManager; import com.iconloop.score.test.TestBase; -import ibc.icon.interfaces.IIBCHandler; -import ibc.icon.interfaces.IIBCHandlerScoreInterface; -import ibc.icon.test.MockContract; import icon.proto.core.channel.Channel; +import ibc.icon.test.MockContract; +import icon.ibc.interfaces.IIBCHandler; +import icon.ibc.interfaces.IIBCHandlerScoreInterface; public class IBCConnectionTestBase extends TestBase { diff --git a/proto/clients/tendermint/TendermintLight.proto b/proto/clients/tendermint/TendermintLight.proto deleted file mode 100644 index 1c802d95c..000000000 --- a/proto/clients/tendermint/TendermintLight.proto +++ /dev/null @@ -1,206 +0,0 @@ -syntax = "proto3"; -package tendermint.light; - -option go_package = "libraries/go/common/tendermint;tendermint"; -import "gogoproto/gogo.proto"; - -message Fraction { - uint64 numerator = 1; - uint64 denominator = 2; -} - -// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Timestamp -message Duration { - int64 seconds = 1; - int32 nanos = 2; -} - -message Consensus { - uint64 block = 1; - uint64 app = 2; -} - -message ClientState { - option (gogoproto.goproto_getters) = false; - - string chain_id = 1; - Fraction trust_level = 2; - - // duration of the period since the LastestTimestamp during which the - // submitted headers are valid for upgrade - Duration trusting_period = 3; - // duration of the staking unbonding period - Duration unbonding_period = 4; - // defines how much new (untrusted) header's Time can drift into the future. - Duration max_clock_drift = 5; - // Block height when the client was frozen due to a misbehaviour - //ibc.core.client.v1.Height frozen_height = 6; - int64 frozen_height = 6; - // Latest height the client was updated to - int64 latest_height = 7; - // This flag, when set to true, will allow governance to recover a client - // which has expired - bool allow_update_after_expiry = 8; - // This flag, when set to true, will allow governance to unfreeze a client - // whose chain has experienced a misbehaviour event - bool allow_update_after_misbehaviour = 9; -} - -// ConsensusState defines the consensus state from Tendermint. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // timestamp that corresponds to the block height in which the ConsensusState - // was stored. - Timestamp timestamp = 1; - - // commitment root (i.e app hash) - MerkleRoot root = 2; - bytes next_validators_hash = 3; -} - -// MerkleRoot defines a merkle root hash. -// In the Cosmos SDK, the AppHash of a block header becomes the root. -message MerkleRoot { - bytes hash = 1; -} - -enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0; - BLOCK_ID_FLAG_ABSENT = 1; - BLOCK_ID_FLAG_COMMIT = 2; - BLOCK_ID_FLAG_NIL = 3; -} - -enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1; - SIGNED_MSG_TYPE_PRECOMMIT = 2; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32; -} - -message CanonicalPartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message CanonicalBlockID { - bytes hash = 1; - CanonicalPartSetHeader part_set_header = 2; -} - -message CanonicalVote { - SignedMsgType type = 1; - sfixed64 height = 2; - sfixed64 round = 3; - BlockID block_id = 4; - Timestamp timestamp = 5; - string chain_id = 6; -} - -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4; - Timestamp timestamp = 5; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - PublicKey pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - PublicKey pub_key = 1; - int64 voting_power = 2; -} - -message PublicKey { - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - bytes sr25519 = 3; - } -} - -message PartSetHeader { - uint32 total = 1; - bytes hash= 2; -} - -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2; -} - -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3; - repeated CommitSig signatures = 4; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - Timestamp timestamp = 3; - bytes signature = 4; -} - -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} - -message LightHeader { - Consensus version = 1; - string chain_id = 2; - int64 height = 3; - Timestamp time = 4; - BlockID last_block_id = 5; - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -message SignedHeader { - LightHeader header = 1; - Commit commit = 2; -} - -message TmHeader { - SignedHeader signed_header = 1; - ValidatorSet validator_set = 2; - - int64 trusted_height = 3; - ValidatorSet trusted_validators = 4; -} diff --git a/proto/core/03-connection/Connection.proto b/proto/core/03-connection/Connection.proto index b5167cf53..7b5efb214 100644 --- a/proto/core/03-connection/Connection.proto +++ b/proto/core/03-connection/Connection.proto @@ -1,10 +1,9 @@ syntax = "proto3"; package icon.proto.core.connection; - -import "core/23-commitment/commitment.proto"; - option go_package = "libraries/go/common/icon;icon"; +import "ibc/core/commitment/v1/commitment.proto"; + // ICS03 - Connection Data Structures as defined in // https://github.com/cosmos/ibc/blob/master/spec/core/ics-003-connection-semantics#data-structures @@ -55,7 +54,7 @@ message Counterparty { // given connection. string connection_id = 2; // commitment merkle prefix of the counterparty chain. - icon.proto.core.commitment.MerklePrefix prefix = 3; + ibc.core.commitment.v1.MerklePrefix prefix = 3; } diff --git a/proto/core/23-commitment/commitment.proto b/proto/core/23-commitment/commitment.proto deleted file mode 100644 index 0f38407af..000000000 --- a/proto/core/23-commitment/commitment.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; - -package icon.proto.core.commitment; - -import "core/23-commitment/proofs.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "libraries/go/common/icon;icon"; - -// MerkleRoot defines a merkle root hash. -// In the Cosmos SDK, the AppHash of a block header becomes the root. -message MerkleRoot { - option (gogoproto.goproto_getters) = false; - - bytes hash = 1; -} - -// MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, -// append(Path.KeyPrefix, key...)) -message MerklePrefix { - bytes key_prefix = 1; -} - -// MerklePath is the path used to verify commitment proofs, which can be an -// arbitrary structured object (defined by a commitment type). -// MerklePath is represented from root-to-leaf -message MerklePath { - repeated string key_path = 1; -} - -// MerkleProof is a wrapper type over a chain of CommitmentProofs. -// It demonstrates membership or non-membership for an element or set of -// elements, verifiable in conjunction with a known commitment root. Proofs -// should be succinct. -// MerkleProofs are ordered from leaf-to-root -message MerkleProof { - repeated icon.proto.core.commitment.CommitmentProof proofs = 1; -} \ No newline at end of file diff --git a/proto/core/23-commitment/proofs.proto b/proto/core/23-commitment/proofs.proto deleted file mode 100644 index 9f3ae6c2e..000000000 --- a/proto/core/23-commitment/proofs.proto +++ /dev/null @@ -1,237 +0,0 @@ -syntax = "proto3"; - -option go_package = "libraries/go/common/icon;icon"; -package icon.proto.core.commitment; - -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) - SHA512_256 = 6; -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; - // prehash_key_before_comparison is a flag that indicates whether to use the - // prehash_key specified by LeafOp to compare lexical ordering of keys for - // non-existence proofs. - bool prehash_key_before_comparison = 5; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/scripts/generate_java_proto.sh b/scripts/generate_java_proto.sh new file mode 100755 index 000000000..462461419 --- /dev/null +++ b/scripts/generate_java_proto.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +cd proto +buf export buf.build/protocolbuffers/wellknowntypes -o ./ +buf export buf.build/cosmos/ibc -o ./ +buf export buf.build/cosmos/ics23:c7c728879896fb260fe76b208ea6a17c2b0132a3 -o ./ +buf export buf.build/tendermint/tendermint -o ./ +sed -i -e 's/ .tendermint/ tendermint/g' ibc/lightclients/tendermint/v1/tendermint.proto + +cd ../contracts/javascore +./gradlew proto-util:generate + +rm -r proto-lib/src/main/java/* +cp -r proto-util/build/generated/sources/cosmos proto-lib/src/main/java/ +cp -r proto-util/build/generated/sources/google proto-lib/src/main/java/ +cp -r proto-util/build/generated/sources/ibc proto-lib/src/main/java/ +cp -r proto-util/build/generated/sources/icon proto-lib/src/main/java/ +cp -r proto-util/build/generated/sources/tendermint proto-lib/src/main/java/ +rm proto-lib/src/main/java/google/protobuf/FileDescriptorSet.java + +cd ../../proto +rm -r amino +rm -r capability +rm -r cosmos_proto +rm -r google +rm -r cosmos_proto +rm -r gogoproto +rm -r ibc +rm -r tendermint