// Generated by the protocol buffer compiler. DO NOT EDIT! // source: types.proto package com.satoshilabs.trezor.protobuf; public final class TrezorType { private TrezorType() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireOut); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugIn); registry.add(com.satoshilabs.trezor.protobuf.TrezorType.wireDebugOut); } /** * Protobuf enum {@code FailureType} * * <pre> ** * Type of failures returned by Failure message * @used_in Failure * </pre> */ public enum FailureType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>Failure_UnexpectedMessage = 1;</code> */ Failure_UnexpectedMessage(0, 1), /** * <code>Failure_ButtonExpected = 2;</code> */ Failure_ButtonExpected(1, 2), /** * <code>Failure_SyntaxError = 3;</code> */ Failure_SyntaxError(2, 3), /** * <code>Failure_ActionCancelled = 4;</code> */ Failure_ActionCancelled(3, 4), /** * <code>Failure_PinExpected = 5;</code> */ Failure_PinExpected(4, 5), /** * <code>Failure_PinCancelled = 6;</code> */ Failure_PinCancelled(5, 6), /** * <code>Failure_PinInvalid = 7;</code> */ Failure_PinInvalid(6, 7), /** * <code>Failure_InvalidSignature = 8;</code> */ Failure_InvalidSignature(7, 8), /** * <code>Failure_Other = 9;</code> */ Failure_Other(8, 9), /** * <code>Failure_NotEnoughFunds = 10;</code> */ Failure_NotEnoughFunds(9, 10), /** * <code>Failure_NotInitialized = 11;</code> */ Failure_NotInitialized(10, 11), /** * <code>Failure_FirmwareError = 99;</code> */ Failure_FirmwareError(11, 99), ; /** * <code>Failure_UnexpectedMessage = 1;</code> */ public static final int Failure_UnexpectedMessage_VALUE = 1; /** * <code>Failure_ButtonExpected = 2;</code> */ public static final int Failure_ButtonExpected_VALUE = 2; /** * <code>Failure_SyntaxError = 3;</code> */ public static final int Failure_SyntaxError_VALUE = 3; /** * <code>Failure_ActionCancelled = 4;</code> */ public static final int Failure_ActionCancelled_VALUE = 4; /** * <code>Failure_PinExpected = 5;</code> */ public static final int Failure_PinExpected_VALUE = 5; /** * <code>Failure_PinCancelled = 6;</code> */ public static final int Failure_PinCancelled_VALUE = 6; /** * <code>Failure_PinInvalid = 7;</code> */ public static final int Failure_PinInvalid_VALUE = 7; /** * <code>Failure_InvalidSignature = 8;</code> */ public static final int Failure_InvalidSignature_VALUE = 8; /** * <code>Failure_Other = 9;</code> */ public static final int Failure_Other_VALUE = 9; /** * <code>Failure_NotEnoughFunds = 10;</code> */ public static final int Failure_NotEnoughFunds_VALUE = 10; /** * <code>Failure_NotInitialized = 11;</code> */ public static final int Failure_NotInitialized_VALUE = 11; /** * <code>Failure_FirmwareError = 99;</code> */ public static final int Failure_FirmwareError_VALUE = 99; public final int getNumber() { return value; } public static FailureType valueOf(int value) { switch (value) { case 1: return Failure_UnexpectedMessage; case 2: return Failure_ButtonExpected; case 3: return Failure_SyntaxError; case 4: return Failure_ActionCancelled; case 5: return Failure_PinExpected; case 6: return Failure_PinCancelled; case 7: return Failure_PinInvalid; case 8: return Failure_InvalidSignature; case 9: return Failure_Other; case 10: return Failure_NotEnoughFunds; case 11: return Failure_NotInitialized; case 99: return Failure_FirmwareError; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<FailureType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<FailureType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<FailureType>() { public FailureType findValueByNumber(int number) { return FailureType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(0); } private static final FailureType[] VALUES = values(); public static FailureType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; FailureType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:FailureType) } /** * Protobuf enum {@code OutputScriptType} * * <pre> ** * Type of script which will be used for transaction output * @used_in TxOutputType * </pre> */ public enum OutputScriptType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>PAYTOADDRESS = 0;</code> */ PAYTOADDRESS(0, 0), /** * <code>PAYTOSCRIPTHASH = 1;</code> */ PAYTOSCRIPTHASH(1, 1), /** * <code>PAYTOMULTISIG = 2;</code> */ PAYTOMULTISIG(2, 2), ; /** * <code>PAYTOADDRESS = 0;</code> */ public static final int PAYTOADDRESS_VALUE = 0; /** * <code>PAYTOSCRIPTHASH = 1;</code> */ public static final int PAYTOSCRIPTHASH_VALUE = 1; /** * <code>PAYTOMULTISIG = 2;</code> */ public static final int PAYTOMULTISIG_VALUE = 2; public final int getNumber() { return value; } public static OutputScriptType valueOf(int value) { switch (value) { case 0: return PAYTOADDRESS; case 1: return PAYTOSCRIPTHASH; case 2: return PAYTOMULTISIG; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<OutputScriptType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<OutputScriptType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<OutputScriptType>() { public OutputScriptType findValueByNumber(int number) { return OutputScriptType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(1); } private static final OutputScriptType[] VALUES = values(); public static OutputScriptType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; OutputScriptType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:OutputScriptType) } /** * Protobuf enum {@code InputScriptType} * * <pre> ** * Type of script which will be used for transaction output * @used_in TxInputType * </pre> */ public enum InputScriptType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>SPENDADDRESS = 0;</code> */ SPENDADDRESS(0, 0), /** * <code>SPENDMULTISIG = 1;</code> */ SPENDMULTISIG(1, 1), ; /** * <code>SPENDADDRESS = 0;</code> */ public static final int SPENDADDRESS_VALUE = 0; /** * <code>SPENDMULTISIG = 1;</code> */ public static final int SPENDMULTISIG_VALUE = 1; public final int getNumber() { return value; } public static InputScriptType valueOf(int value) { switch (value) { case 0: return SPENDADDRESS; case 1: return SPENDMULTISIG; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<InputScriptType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<InputScriptType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<InputScriptType>() { public InputScriptType findValueByNumber(int number) { return InputScriptType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(2); } private static final InputScriptType[] VALUES = values(); public static InputScriptType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; InputScriptType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:InputScriptType) } /** * Protobuf enum {@code RequestType} * * <pre> ** * Type of information required by transaction signing process * @used_in TxRequest * </pre> */ public enum RequestType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>TXINPUT = 0;</code> */ TXINPUT(0, 0), /** * <code>TXOUTPUT = 1;</code> */ TXOUTPUT(1, 1), /** * <code>TXMETA = 2;</code> */ TXMETA(2, 2), /** * <code>TXFINISHED = 3;</code> */ TXFINISHED(3, 3), ; /** * <code>TXINPUT = 0;</code> */ public static final int TXINPUT_VALUE = 0; /** * <code>TXOUTPUT = 1;</code> */ public static final int TXOUTPUT_VALUE = 1; /** * <code>TXMETA = 2;</code> */ public static final int TXMETA_VALUE = 2; /** * <code>TXFINISHED = 3;</code> */ public static final int TXFINISHED_VALUE = 3; public final int getNumber() { return value; } public static RequestType valueOf(int value) { switch (value) { case 0: return TXINPUT; case 1: return TXOUTPUT; case 2: return TXMETA; case 3: return TXFINISHED; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<RequestType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<RequestType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<RequestType>() { public RequestType findValueByNumber(int number) { return RequestType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(3); } private static final RequestType[] VALUES = values(); public static RequestType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; RequestType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:RequestType) } /** * Protobuf enum {@code ButtonRequestType} * * <pre> ** * Type of button request * @used_in ButtonRequest * </pre> */ public enum ButtonRequestType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>ButtonRequest_Other = 1;</code> */ ButtonRequest_Other(0, 1), /** * <code>ButtonRequest_FeeOverThreshold = 2;</code> */ ButtonRequest_FeeOverThreshold(1, 2), /** * <code>ButtonRequest_ConfirmOutput = 3;</code> */ ButtonRequest_ConfirmOutput(2, 3), /** * <code>ButtonRequest_ResetDevice = 4;</code> */ ButtonRequest_ResetDevice(3, 4), /** * <code>ButtonRequest_ConfirmWord = 5;</code> */ ButtonRequest_ConfirmWord(4, 5), /** * <code>ButtonRequest_WipeDevice = 6;</code> */ ButtonRequest_WipeDevice(5, 6), /** * <code>ButtonRequest_ProtectCall = 7;</code> */ ButtonRequest_ProtectCall(6, 7), /** * <code>ButtonRequest_SignTx = 8;</code> */ ButtonRequest_SignTx(7, 8), /** * <code>ButtonRequest_FirmwareCheck = 9;</code> */ ButtonRequest_FirmwareCheck(8, 9), /** * <code>ButtonRequest_Address = 10;</code> */ ButtonRequest_Address(9, 10), ; /** * <code>ButtonRequest_Other = 1;</code> */ public static final int ButtonRequest_Other_VALUE = 1; /** * <code>ButtonRequest_FeeOverThreshold = 2;</code> */ public static final int ButtonRequest_FeeOverThreshold_VALUE = 2; /** * <code>ButtonRequest_ConfirmOutput = 3;</code> */ public static final int ButtonRequest_ConfirmOutput_VALUE = 3; /** * <code>ButtonRequest_ResetDevice = 4;</code> */ public static final int ButtonRequest_ResetDevice_VALUE = 4; /** * <code>ButtonRequest_ConfirmWord = 5;</code> */ public static final int ButtonRequest_ConfirmWord_VALUE = 5; /** * <code>ButtonRequest_WipeDevice = 6;</code> */ public static final int ButtonRequest_WipeDevice_VALUE = 6; /** * <code>ButtonRequest_ProtectCall = 7;</code> */ public static final int ButtonRequest_ProtectCall_VALUE = 7; /** * <code>ButtonRequest_SignTx = 8;</code> */ public static final int ButtonRequest_SignTx_VALUE = 8; /** * <code>ButtonRequest_FirmwareCheck = 9;</code> */ public static final int ButtonRequest_FirmwareCheck_VALUE = 9; /** * <code>ButtonRequest_Address = 10;</code> */ public static final int ButtonRequest_Address_VALUE = 10; public final int getNumber() { return value; } public static ButtonRequestType valueOf(int value) { switch (value) { case 1: return ButtonRequest_Other; case 2: return ButtonRequest_FeeOverThreshold; case 3: return ButtonRequest_ConfirmOutput; case 4: return ButtonRequest_ResetDevice; case 5: return ButtonRequest_ConfirmWord; case 6: return ButtonRequest_WipeDevice; case 7: return ButtonRequest_ProtectCall; case 8: return ButtonRequest_SignTx; case 9: return ButtonRequest_FirmwareCheck; case 10: return ButtonRequest_Address; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<ButtonRequestType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<ButtonRequestType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<ButtonRequestType>() { public ButtonRequestType findValueByNumber(int number) { return ButtonRequestType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(4); } private static final ButtonRequestType[] VALUES = values(); public static ButtonRequestType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; ButtonRequestType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:ButtonRequestType) } /** * Protobuf enum {@code PinMatrixRequestType} * * <pre> ** * Type of PIN request * @used_in PinMatrixRequest * </pre> */ public enum PinMatrixRequestType implements com.google.protobuf.ProtocolMessageEnum { /** * <code>PinMatrixRequestType_Current = 1;</code> */ PinMatrixRequestType_Current(0, 1), /** * <code>PinMatrixRequestType_NewFirst = 2;</code> */ PinMatrixRequestType_NewFirst(1, 2), /** * <code>PinMatrixRequestType_NewSecond = 3;</code> */ PinMatrixRequestType_NewSecond(2, 3), ; /** * <code>PinMatrixRequestType_Current = 1;</code> */ public static final int PinMatrixRequestType_Current_VALUE = 1; /** * <code>PinMatrixRequestType_NewFirst = 2;</code> */ public static final int PinMatrixRequestType_NewFirst_VALUE = 2; /** * <code>PinMatrixRequestType_NewSecond = 3;</code> */ public static final int PinMatrixRequestType_NewSecond_VALUE = 3; public final int getNumber() { return value; } public static PinMatrixRequestType valueOf(int value) { switch (value) { case 1: return PinMatrixRequestType_Current; case 2: return PinMatrixRequestType_NewFirst; case 3: return PinMatrixRequestType_NewSecond; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap<PinMatrixRequestType> internalGetValueMap() { return internalValueMap; } private static com.google.protobuf.Internal.EnumLiteMap<PinMatrixRequestType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<PinMatrixRequestType>() { public PinMatrixRequestType findValueByNumber(int number) { return PinMatrixRequestType.valueOf(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.getDescriptor().getEnumTypes().get(5); } private static final PinMatrixRequestType[] VALUES = values(); public static PinMatrixRequestType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int index; private final int value; PinMatrixRequestType(int index, int value) { this.index = index; this.value = value; } // @@protoc_insertion_point(enum_scope:PinMatrixRequestType) } public interface HDNodeTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:HDNodeType) com.google.protobuf.MessageOrBuilder { /** * <code>required uint32 depth = 1;</code> */ boolean hasDepth(); /** * <code>required uint32 depth = 1;</code> */ int getDepth(); /** * <code>required uint32 fingerprint = 2;</code> */ boolean hasFingerprint(); /** * <code>required uint32 fingerprint = 2;</code> */ int getFingerprint(); /** * <code>required uint32 child_num = 3;</code> */ boolean hasChildNum(); /** * <code>required uint32 child_num = 3;</code> */ int getChildNum(); /** * <code>required bytes chain_code = 4;</code> */ boolean hasChainCode(); /** * <code>required bytes chain_code = 4;</code> */ com.google.protobuf.ByteString getChainCode(); /** * <code>optional bytes private_key = 5;</code> */ boolean hasPrivateKey(); /** * <code>optional bytes private_key = 5;</code> */ com.google.protobuf.ByteString getPrivateKey(); /** * <code>optional bytes public_key = 6;</code> */ boolean hasPublicKey(); /** * <code>optional bytes public_key = 6;</code> */ com.google.protobuf.ByteString getPublicKey(); } /** * Protobuf type {@code HDNodeType} * * <pre> ** * Structure representing BIP32 (hierarchical deterministic) node * Used for imports of private key into the device and exporting public key out of device * @used_in PublicKey * @used_in LoadDevice * @used_in DebugLinkState * @used_in Storage * </pre> */ public static final class HDNodeType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:HDNodeType) HDNodeTypeOrBuilder { // Use HDNodeType.newBuilder() to construct. private HDNodeType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private HDNodeType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final HDNodeType defaultInstance; public static HDNodeType getDefaultInstance() { return defaultInstance; } public HDNodeType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private HDNodeType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; depth_ = input.readUInt32(); break; } case 16: { bitField0_ |= 0x00000002; fingerprint_ = input.readUInt32(); break; } case 24: { bitField0_ |= 0x00000004; childNum_ = input.readUInt32(); break; } case 34: { bitField0_ |= 0x00000008; chainCode_ = input.readBytes(); break; } case 42: { bitField0_ |= 0x00000010; privateKey_ = input.readBytes(); break; } case 50: { bitField0_ |= 0x00000020; publicKey_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodeType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodeType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.class, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder.class); } public static com.google.protobuf.Parser<HDNodeType> PARSER = new com.google.protobuf.AbstractParser<HDNodeType>() { public HDNodeType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new HDNodeType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<HDNodeType> getParserForType() { return PARSER; } private int bitField0_; public static final int DEPTH_FIELD_NUMBER = 1; private int depth_; /** * <code>required uint32 depth = 1;</code> */ public boolean hasDepth() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 depth = 1;</code> */ public int getDepth() { return depth_; } public static final int FINGERPRINT_FIELD_NUMBER = 2; private int fingerprint_; /** * <code>required uint32 fingerprint = 2;</code> */ public boolean hasFingerprint() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 fingerprint = 2;</code> */ public int getFingerprint() { return fingerprint_; } public static final int CHILD_NUM_FIELD_NUMBER = 3; private int childNum_; /** * <code>required uint32 child_num = 3;</code> */ public boolean hasChildNum() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required uint32 child_num = 3;</code> */ public int getChildNum() { return childNum_; } public static final int CHAIN_CODE_FIELD_NUMBER = 4; private com.google.protobuf.ByteString chainCode_; /** * <code>required bytes chain_code = 4;</code> */ public boolean hasChainCode() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>required bytes chain_code = 4;</code> */ public com.google.protobuf.ByteString getChainCode() { return chainCode_; } public static final int PRIVATE_KEY_FIELD_NUMBER = 5; private com.google.protobuf.ByteString privateKey_; /** * <code>optional bytes private_key = 5;</code> */ public boolean hasPrivateKey() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bytes private_key = 5;</code> */ public com.google.protobuf.ByteString getPrivateKey() { return privateKey_; } public static final int PUBLIC_KEY_FIELD_NUMBER = 6; private com.google.protobuf.ByteString publicKey_; /** * <code>optional bytes public_key = 6;</code> */ public boolean hasPublicKey() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bytes public_key = 6;</code> */ public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } private void initFields() { depth_ = 0; fingerprint_ = 0; childNum_ = 0; chainCode_ = com.google.protobuf.ByteString.EMPTY; privateKey_ = com.google.protobuf.ByteString.EMPTY; publicKey_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasDepth()) { memoizedIsInitialized = 0; return false; } if (!hasFingerprint()) { memoizedIsInitialized = 0; return false; } if (!hasChildNum()) { memoizedIsInitialized = 0; return false; } if (!hasChainCode()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, depth_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(2, fingerprint_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(3, childNum_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeBytes(4, chainCode_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeBytes(5, privateKey_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeBytes(6, publicKey_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, depth_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(2, fingerprint_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, childNum_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, chainCode_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(5, privateKey_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(6, publicKey_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code HDNodeType} * * <pre> ** * Structure representing BIP32 (hierarchical deterministic) node * Used for imports of private key into the device and exporting public key out of device * @used_in PublicKey * @used_in LoadDevice * @used_in DebugLinkState * @used_in Storage * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:HDNodeType) com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodeType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodeType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.class, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); depth_ = 0; bitField0_ = (bitField0_ & ~0x00000001); fingerprint_ = 0; bitField0_ = (bitField0_ & ~0x00000002); childNum_ = 0; bitField0_ = (bitField0_ & ~0x00000004); chainCode_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); privateKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000010); publicKey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodeType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType build() { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType result = new com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.depth_ = depth_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.fingerprint_ = fingerprint_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.childNum_ = childNum_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.chainCode_ = chainCode_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.privateKey_ = privateKey_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } result.publicKey_ = publicKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance()) return this; if (other.hasDepth()) { setDepth(other.getDepth()); } if (other.hasFingerprint()) { setFingerprint(other.getFingerprint()); } if (other.hasChildNum()) { setChildNum(other.getChildNum()); } if (other.hasChainCode()) { setChainCode(other.getChainCode()); } if (other.hasPrivateKey()) { setPrivateKey(other.getPrivateKey()); } if (other.hasPublicKey()) { setPublicKey(other.getPublicKey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasDepth()) { return false; } if (!hasFingerprint()) { return false; } return hasChildNum() && hasChainCode(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int depth_ ; /** * <code>required uint32 depth = 1;</code> */ public boolean hasDepth() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint32 depth = 1;</code> */ public int getDepth() { return depth_; } /** * <code>required uint32 depth = 1;</code> */ public Builder setDepth(int value) { bitField0_ |= 0x00000001; depth_ = value; onChanged(); return this; } /** * <code>required uint32 depth = 1;</code> */ public Builder clearDepth() { bitField0_ = (bitField0_ & ~0x00000001); depth_ = 0; onChanged(); return this; } private int fingerprint_ ; /** * <code>required uint32 fingerprint = 2;</code> */ public boolean hasFingerprint() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 fingerprint = 2;</code> */ public int getFingerprint() { return fingerprint_; } /** * <code>required uint32 fingerprint = 2;</code> */ public Builder setFingerprint(int value) { bitField0_ |= 0x00000002; fingerprint_ = value; onChanged(); return this; } /** * <code>required uint32 fingerprint = 2;</code> */ public Builder clearFingerprint() { bitField0_ = (bitField0_ & ~0x00000002); fingerprint_ = 0; onChanged(); return this; } private int childNum_ ; /** * <code>required uint32 child_num = 3;</code> */ public boolean hasChildNum() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required uint32 child_num = 3;</code> */ public int getChildNum() { return childNum_; } /** * <code>required uint32 child_num = 3;</code> */ public Builder setChildNum(int value) { bitField0_ |= 0x00000004; childNum_ = value; onChanged(); return this; } /** * <code>required uint32 child_num = 3;</code> */ public Builder clearChildNum() { bitField0_ = (bitField0_ & ~0x00000004); childNum_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString chainCode_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes chain_code = 4;</code> */ public boolean hasChainCode() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>required bytes chain_code = 4;</code> */ public com.google.protobuf.ByteString getChainCode() { return chainCode_; } /** * <code>required bytes chain_code = 4;</code> */ public Builder setChainCode(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; chainCode_ = value; onChanged(); return this; } /** * <code>required bytes chain_code = 4;</code> */ public Builder clearChainCode() { bitField0_ = (bitField0_ & ~0x00000008); chainCode_ = getDefaultInstance().getChainCode(); onChanged(); return this; } private com.google.protobuf.ByteString privateKey_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes private_key = 5;</code> */ public boolean hasPrivateKey() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional bytes private_key = 5;</code> */ public com.google.protobuf.ByteString getPrivateKey() { return privateKey_; } /** * <code>optional bytes private_key = 5;</code> */ public Builder setPrivateKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; privateKey_ = value; onChanged(); return this; } /** * <code>optional bytes private_key = 5;</code> */ public Builder clearPrivateKey() { bitField0_ = (bitField0_ & ~0x00000010); privateKey_ = getDefaultInstance().getPrivateKey(); onChanged(); return this; } private com.google.protobuf.ByteString publicKey_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes public_key = 6;</code> */ public boolean hasPublicKey() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional bytes public_key = 6;</code> */ public com.google.protobuf.ByteString getPublicKey() { return publicKey_; } /** * <code>optional bytes public_key = 6;</code> */ public Builder setPublicKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; publicKey_ = value; onChanged(); return this; } /** * <code>optional bytes public_key = 6;</code> */ public Builder clearPublicKey() { bitField0_ = (bitField0_ & ~0x00000020); publicKey_ = getDefaultInstance().getPublicKey(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:HDNodeType) } static { defaultInstance = new HDNodeType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:HDNodeType) } public interface HDNodePathTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:HDNodePathType) com.google.protobuf.MessageOrBuilder { /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ boolean hasNode(); /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode(); /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ int getAddressN(int index); } /** * Protobuf type {@code HDNodePathType} */ public static final class HDNodePathType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:HDNodePathType) HDNodePathTypeOrBuilder { // Use HDNodePathType.newBuilder() to construct. private HDNodePathType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private HDNodePathType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final HDNodePathType defaultInstance; public static HDNodePathType getDefaultInstance() { return defaultInstance; } public HDNodePathType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private HDNodePathType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = node_.toBuilder(); } node_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(node_); node_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 16: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000002; } addressN_.add(input.readUInt32()); break; } case 18: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000002; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodePathType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodePathType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.class, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder.class); } public static com.google.protobuf.Parser<HDNodePathType> PARSER = new com.google.protobuf.AbstractParser<HDNodePathType>() { public HDNodePathType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new HDNodePathType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<HDNodePathType> getParserForType() { return PARSER; } private int bitField0_; public static final int NODE_FIELD_NUMBER = 1; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_; /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { return node_; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { return node_; } public static final int ADDRESS_N_FIELD_NUMBER = 2; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } private void initFields() { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); addressN_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasNode()) { memoizedIsInitialized = 0; return false; } if (!getNode().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, node_); } for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(2, addressN_.get(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, node_); } { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code HDNodePathType} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:HDNodePathType) com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodePathType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodePathType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.class, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getNodeFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_HDNodePathType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType build() { com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType result = new com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (nodeBuilder_ == null) { result.node_ = node_; } else { result.node_ = nodeBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000002); } result.addressN_ = addressN_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.getDefaultInstance()) return this; if (other.hasNode()) { mergeNode(other.getNode()); } if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasNode() && getNode().isInitialized(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> nodeBuilder_; /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public boolean hasNode() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType getNode() { if (nodeBuilder_ == null) { return node_; } else { return nodeBuilder_.getMessage(); } } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public Builder setNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } node_ = value; onChanged(); } else { nodeBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public Builder setNode( com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder builderForValue) { if (nodeBuilder_ == null) { node_ = builderForValue.build(); onChanged(); } else { nodeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public Builder mergeNode(com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType value) { if (nodeBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && node_ != com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance()) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.newBuilder(node_).mergeFrom(value).buildPartial(); } else { node_ = value; } onChanged(); } else { nodeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public Builder clearNode() { if (nodeBuilder_ == null) { node_ = com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.getDefaultInstance(); onChanged(); } else { nodeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder getNodeBuilder() { bitField0_ |= 0x00000001; onChanged(); return getNodeFieldBuilder().getBuilder(); } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder getNodeOrBuilder() { if (nodeBuilder_ != null) { return nodeBuilder_.getMessageOrBuilder(); } else { return node_; } } /** * <code>required .HDNodeType node = 1;</code> * * <pre> * BIP-32 node in deserialized form * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder> getNodeFieldBuilder() { if (nodeBuilder_ == null) { nodeBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodeTypeOrBuilder>( getNode(), getParentForChildren(), isClean()); node_ = null; } return nodeBuilder_; } private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000002; } } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:HDNodePathType) } static { defaultInstance = new HDNodePathType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:HDNodePathType) } public interface CoinTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:CoinType) com.google.protobuf.MessageOrBuilder { /** * <code>optional string coin_name = 1;</code> */ boolean hasCoinName(); /** * <code>optional string coin_name = 1;</code> */ java.lang.String getCoinName(); /** * <code>optional string coin_name = 1;</code> */ com.google.protobuf.ByteString getCoinNameBytes(); /** * <code>optional string coin_shortcut = 2;</code> */ boolean hasCoinShortcut(); /** * <code>optional string coin_shortcut = 2;</code> */ java.lang.String getCoinShortcut(); /** * <code>optional string coin_shortcut = 2;</code> */ com.google.protobuf.ByteString getCoinShortcutBytes(); /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ boolean hasAddressType(); /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ int getAddressType(); /** * <code>optional uint64 maxfee_kb = 4;</code> */ boolean hasMaxfeeKb(); /** * <code>optional uint64 maxfee_kb = 4;</code> */ long getMaxfeeKb(); /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ boolean hasAddressTypeP2Sh(); /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ int getAddressTypeP2Sh(); } /** * Protobuf type {@code CoinType} * * <pre> ** * Structure representing Coin * @used_in Features * </pre> */ public static final class CoinType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:CoinType) CoinTypeOrBuilder { // Use CoinType.newBuilder() to construct. private CoinType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private CoinType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final CoinType defaultInstance; public static CoinType getDefaultInstance() { return defaultInstance; } public CoinType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CoinType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; coinName_ = bs; break; } case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; coinShortcut_ = bs; break; } case 24: { bitField0_ |= 0x00000004; addressType_ = input.readUInt32(); break; } case 32: { bitField0_ |= 0x00000008; maxfeeKb_ = input.readUInt64(); break; } case 40: { bitField0_ |= 0x00000010; addressTypeP2Sh_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_CoinType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_CoinType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.CoinType.class, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder.class); } public static com.google.protobuf.Parser<CoinType> PARSER = new com.google.protobuf.AbstractParser<CoinType>() { public CoinType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CoinType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<CoinType> getParserForType() { return PARSER; } private int bitField0_; public static final int COIN_NAME_FIELD_NUMBER = 1; private java.lang.Object coinName_; /** * <code>optional string coin_name = 1;</code> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string coin_name = 1;</code> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } } /** * <code>optional string coin_name = 1;</code> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COIN_SHORTCUT_FIELD_NUMBER = 2; private java.lang.Object coinShortcut_; /** * <code>optional string coin_shortcut = 2;</code> */ public boolean hasCoinShortcut() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string coin_shortcut = 2;</code> */ public java.lang.String getCoinShortcut() { java.lang.Object ref = coinShortcut_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinShortcut_ = s; } return s; } } /** * <code>optional string coin_shortcut = 2;</code> */ public com.google.protobuf.ByteString getCoinShortcutBytes() { java.lang.Object ref = coinShortcut_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinShortcut_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ADDRESS_TYPE_FIELD_NUMBER = 3; private int addressType_; /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public boolean hasAddressType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public int getAddressType() { return addressType_; } public static final int MAXFEE_KB_FIELD_NUMBER = 4; private long maxfeeKb_; /** * <code>optional uint64 maxfee_kb = 4;</code> */ public boolean hasMaxfeeKb() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint64 maxfee_kb = 4;</code> */ public long getMaxfeeKb() { return maxfeeKb_; } public static final int ADDRESS_TYPE_P2SH_FIELD_NUMBER = 5; private int addressTypeP2Sh_; /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public boolean hasAddressTypeP2Sh() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public int getAddressTypeP2Sh() { return addressTypeP2Sh_; } private void initFields() { coinName_ = ""; coinShortcut_ = ""; addressType_ = 0; maxfeeKb_ = 0L; addressTypeP2Sh_ = 5; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getCoinNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getCoinShortcutBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(3, addressType_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt64(4, maxfeeKb_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeUInt32(5, addressTypeP2Sh_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getCoinNameBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getCoinShortcutBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, addressType_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(4, maxfeeKb_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(5, addressTypeP2Sh_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.CoinType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.CoinType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code CoinType} * * <pre> ** * Structure representing Coin * @used_in Features * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:CoinType) com.satoshilabs.trezor.protobuf.TrezorType.CoinTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_CoinType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_CoinType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.CoinType.class, com.satoshilabs.trezor.protobuf.TrezorType.CoinType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.CoinType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); coinName_ = ""; bitField0_ = (bitField0_ & ~0x00000001); coinShortcut_ = ""; bitField0_ = (bitField0_ & ~0x00000002); addressType_ = 0; bitField0_ = (bitField0_ & ~0x00000004); maxfeeKb_ = 0L; bitField0_ = (bitField0_ & ~0x00000008); addressTypeP2Sh_ = 5; bitField0_ = (bitField0_ & ~0x00000010); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_CoinType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.CoinType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.CoinType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.CoinType build() { com.satoshilabs.trezor.protobuf.TrezorType.CoinType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.CoinType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.CoinType result = new com.satoshilabs.trezor.protobuf.TrezorType.CoinType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.coinName_ = coinName_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.coinShortcut_ = coinShortcut_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.addressType_ = addressType_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } result.maxfeeKb_ = maxfeeKb_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } result.addressTypeP2Sh_ = addressTypeP2Sh_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.CoinType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.CoinType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.CoinType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.CoinType.getDefaultInstance()) return this; if (other.hasCoinName()) { bitField0_ |= 0x00000001; coinName_ = other.coinName_; onChanged(); } if (other.hasCoinShortcut()) { bitField0_ |= 0x00000002; coinShortcut_ = other.coinShortcut_; onChanged(); } if (other.hasAddressType()) { setAddressType(other.getAddressType()); } if (other.hasMaxfeeKb()) { setMaxfeeKb(other.getMaxfeeKb()); } if (other.hasAddressTypeP2Sh()) { setAddressTypeP2Sh(other.getAddressTypeP2Sh()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.CoinType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.CoinType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object coinName_ = ""; /** * <code>optional string coin_name = 1;</code> */ public boolean hasCoinName() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string coin_name = 1;</code> */ public java.lang.String getCoinName() { java.lang.Object ref = coinName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinName_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_name = 1;</code> */ public com.google.protobuf.ByteString getCoinNameBytes() { java.lang.Object ref = coinName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_name = 1;</code> */ public Builder setCoinName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; coinName_ = value; onChanged(); return this; } /** * <code>optional string coin_name = 1;</code> */ public Builder clearCoinName() { bitField0_ = (bitField0_ & ~0x00000001); coinName_ = getDefaultInstance().getCoinName(); onChanged(); return this; } /** * <code>optional string coin_name = 1;</code> */ public Builder setCoinNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; coinName_ = value; onChanged(); return this; } private java.lang.Object coinShortcut_ = ""; /** * <code>optional string coin_shortcut = 2;</code> */ public boolean hasCoinShortcut() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string coin_shortcut = 2;</code> */ public java.lang.String getCoinShortcut() { java.lang.Object ref = coinShortcut_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { coinShortcut_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string coin_shortcut = 2;</code> */ public com.google.protobuf.ByteString getCoinShortcutBytes() { java.lang.Object ref = coinShortcut_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); coinShortcut_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string coin_shortcut = 2;</code> */ public Builder setCoinShortcut( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; coinShortcut_ = value; onChanged(); return this; } /** * <code>optional string coin_shortcut = 2;</code> */ public Builder clearCoinShortcut() { bitField0_ = (bitField0_ & ~0x00000002); coinShortcut_ = getDefaultInstance().getCoinShortcut(); onChanged(); return this; } /** * <code>optional string coin_shortcut = 2;</code> */ public Builder setCoinShortcutBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; coinShortcut_ = value; onChanged(); return this; } private int addressType_ ; /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public boolean hasAddressType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public int getAddressType() { return addressType_; } /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public Builder setAddressType(int value) { bitField0_ |= 0x00000004; addressType_ = value; onChanged(); return this; } /** * <code>optional uint32 address_type = 3 [default = 0];</code> */ public Builder clearAddressType() { bitField0_ = (bitField0_ & ~0x00000004); addressType_ = 0; onChanged(); return this; } private long maxfeeKb_ ; /** * <code>optional uint64 maxfee_kb = 4;</code> */ public boolean hasMaxfeeKb() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint64 maxfee_kb = 4;</code> */ public long getMaxfeeKb() { return maxfeeKb_; } /** * <code>optional uint64 maxfee_kb = 4;</code> */ public Builder setMaxfeeKb(long value) { bitField0_ |= 0x00000008; maxfeeKb_ = value; onChanged(); return this; } /** * <code>optional uint64 maxfee_kb = 4;</code> */ public Builder clearMaxfeeKb() { bitField0_ = (bitField0_ & ~0x00000008); maxfeeKb_ = 0L; onChanged(); return this; } private int addressTypeP2Sh_ = 5; /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public boolean hasAddressTypeP2Sh() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public int getAddressTypeP2Sh() { return addressTypeP2Sh_; } /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public Builder setAddressTypeP2Sh(int value) { bitField0_ |= 0x00000010; addressTypeP2Sh_ = value; onChanged(); return this; } /** * <code>optional uint32 address_type_p2sh = 5 [default = 5];</code> */ public Builder clearAddressTypeP2Sh() { bitField0_ = (bitField0_ & ~0x00000010); addressTypeP2Sh_ = 5; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:CoinType) } static { defaultInstance = new CoinType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:CoinType) } public interface MultisigRedeemScriptTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:MultisigRedeemScriptType) com.google.protobuf.MessageOrBuilder { /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> getPubkeysList(); /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType getPubkeys(int index); /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ int getPubkeysCount(); /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder> getPubkeysOrBuilderList(); /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder getPubkeysOrBuilder( int index); /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ java.util.List<com.google.protobuf.ByteString> getSignaturesList(); /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ int getSignaturesCount(); /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ com.google.protobuf.ByteString getSignatures(int index); /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ boolean hasM(); /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ int getM(); } /** * Protobuf type {@code MultisigRedeemScriptType} * * <pre> ** * Type of redeem script used in input * @used_in TxInputType * </pre> */ public static final class MultisigRedeemScriptType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:MultisigRedeemScriptType) MultisigRedeemScriptTypeOrBuilder { // Use MultisigRedeemScriptType.newBuilder() to construct. private MultisigRedeemScriptType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private MultisigRedeemScriptType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final MultisigRedeemScriptType defaultInstance; public static MultisigRedeemScriptType getDefaultInstance() { return defaultInstance; } public MultisigRedeemScriptType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MultisigRedeemScriptType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { pubkeys_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType>(); mutable_bitField0_ |= 0x00000001; } pubkeys_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.PARSER, extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { signatures_ = new java.util.ArrayList<com.google.protobuf.ByteString>(); mutable_bitField0_ |= 0x00000002; } signatures_.add(input.readBytes()); break; } case 24: { bitField0_ |= 0x00000001; m_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { pubkeys_ = java.util.Collections.unmodifiableList(pubkeys_); } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { signatures_ = java.util.Collections.unmodifiableList(signatures_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_MultisigRedeemScriptType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_MultisigRedeemScriptType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.class, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder.class); } public static com.google.protobuf.Parser<MultisigRedeemScriptType> PARSER = new com.google.protobuf.AbstractParser<MultisigRedeemScriptType>() { public MultisigRedeemScriptType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MultisigRedeemScriptType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<MultisigRedeemScriptType> getParserForType() { return PARSER; } private int bitField0_; public static final int PUBKEYS_FIELD_NUMBER = 1; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> pubkeys_; /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> getPubkeysList() { return pubkeys_; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder> getPubkeysOrBuilderList() { return pubkeys_; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public int getPubkeysCount() { return pubkeys_.size(); } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType getPubkeys(int index) { return pubkeys_.get(index); } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder getPubkeysOrBuilder( int index) { return pubkeys_.get(index); } public static final int SIGNATURES_FIELD_NUMBER = 2; private java.util.List<com.google.protobuf.ByteString> signatures_; /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public java.util.List<com.google.protobuf.ByteString> getSignaturesList() { return signatures_; } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public int getSignaturesCount() { return signatures_.size(); } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public com.google.protobuf.ByteString getSignatures(int index) { return signatures_.get(index); } public static final int M_FIELD_NUMBER = 3; private int m_; /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public boolean hasM() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public int getM() { return m_; } private void initFields() { pubkeys_ = java.util.Collections.emptyList(); signatures_ = java.util.Collections.emptyList(); m_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; for (int i = 0; i < getPubkeysCount(); i++) { if (!getPubkeys(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < pubkeys_.size(); i++) { output.writeMessage(1, pubkeys_.get(i)); } for (int i = 0; i < signatures_.size(); i++) { output.writeBytes(2, signatures_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(3, m_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; for (int i = 0; i < pubkeys_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, pubkeys_.get(i)); } { int dataSize = 0; for (int i = 0; i < signatures_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(signatures_.get(i)); } size += dataSize; size += 1 * getSignaturesList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, m_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code MultisigRedeemScriptType} * * <pre> ** * Type of redeem script used in input * @used_in TxInputType * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:MultisigRedeemScriptType) com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_MultisigRedeemScriptType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_MultisigRedeemScriptType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.class, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getPubkeysFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (pubkeysBuilder_ == null) { pubkeys_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { pubkeysBuilder_.clear(); } signatures_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); m_ = 0; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_MultisigRedeemScriptType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType build() { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType result = new com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pubkeysBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { pubkeys_ = java.util.Collections.unmodifiableList(pubkeys_); bitField0_ = (bitField0_ & ~0x00000001); } result.pubkeys_ = pubkeys_; } else { result.pubkeys_ = pubkeysBuilder_.build(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { signatures_ = java.util.Collections.unmodifiableList(signatures_); bitField0_ = (bitField0_ & ~0x00000002); } result.signatures_ = signatures_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000001; } result.m_ = m_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance()) return this; if (pubkeysBuilder_ == null) { if (!other.pubkeys_.isEmpty()) { if (pubkeys_.isEmpty()) { pubkeys_ = other.pubkeys_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePubkeysIsMutable(); pubkeys_.addAll(other.pubkeys_); } onChanged(); } } else { if (!other.pubkeys_.isEmpty()) { if (pubkeysBuilder_.isEmpty()) { pubkeysBuilder_.dispose(); pubkeysBuilder_ = null; pubkeys_ = other.pubkeys_; bitField0_ = (bitField0_ & ~0x00000001); pubkeysBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPubkeysFieldBuilder() : null; } else { pubkeysBuilder_.addAllMessages(other.pubkeys_); } } } if (!other.signatures_.isEmpty()) { if (signatures_.isEmpty()) { signatures_ = other.signatures_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureSignaturesIsMutable(); signatures_.addAll(other.signatures_); } onChanged(); } if (other.hasM()) { setM(other.getM()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { for (int i = 0; i < getPubkeysCount(); i++) { if (!getPubkeys(i).isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> pubkeys_ = java.util.Collections.emptyList(); private void ensurePubkeysIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { pubkeys_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType>(pubkeys_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder> pubkeysBuilder_; /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> getPubkeysList() { if (pubkeysBuilder_ == null) { return java.util.Collections.unmodifiableList(pubkeys_); } else { return pubkeysBuilder_.getMessageList(); } } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public int getPubkeysCount() { if (pubkeysBuilder_ == null) { return pubkeys_.size(); } else { return pubkeysBuilder_.getCount(); } } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType getPubkeys(int index) { if (pubkeysBuilder_ == null) { return pubkeys_.get(index); } else { return pubkeysBuilder_.getMessage(index); } } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder setPubkeys( int index, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType value) { if (pubkeysBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePubkeysIsMutable(); pubkeys_.set(index, value); onChanged(); } else { pubkeysBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder setPubkeys( int index, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder builderForValue) { if (pubkeysBuilder_ == null) { ensurePubkeysIsMutable(); pubkeys_.set(index, builderForValue.build()); onChanged(); } else { pubkeysBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder addPubkeys(com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType value) { if (pubkeysBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePubkeysIsMutable(); pubkeys_.add(value); onChanged(); } else { pubkeysBuilder_.addMessage(value); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder addPubkeys( int index, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType value) { if (pubkeysBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePubkeysIsMutable(); pubkeys_.add(index, value); onChanged(); } else { pubkeysBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder addPubkeys( com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder builderForValue) { if (pubkeysBuilder_ == null) { ensurePubkeysIsMutable(); pubkeys_.add(builderForValue.build()); onChanged(); } else { pubkeysBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder addPubkeys( int index, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder builderForValue) { if (pubkeysBuilder_ == null) { ensurePubkeysIsMutable(); pubkeys_.add(index, builderForValue.build()); onChanged(); } else { pubkeysBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder addAllPubkeys( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType> values) { if (pubkeysBuilder_ == null) { ensurePubkeysIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, pubkeys_); onChanged(); } else { pubkeysBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder clearPubkeys() { if (pubkeysBuilder_ == null) { pubkeys_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { pubkeysBuilder_.clear(); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public Builder removePubkeys(int index) { if (pubkeysBuilder_ == null) { ensurePubkeysIsMutable(); pubkeys_.remove(index); onChanged(); } else { pubkeysBuilder_.remove(index); } return this; } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder getPubkeysBuilder( int index) { return getPubkeysFieldBuilder().getBuilder(index); } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder getPubkeysOrBuilder( int index) { if (pubkeysBuilder_ == null) { return pubkeys_.get(index); } else { return pubkeysBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder> getPubkeysOrBuilderList() { if (pubkeysBuilder_ != null) { return pubkeysBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(pubkeys_); } } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder addPubkeysBuilder() { return getPubkeysFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.getDefaultInstance()); } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder addPubkeysBuilder( int index) { return getPubkeysFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.getDefaultInstance()); } /** * <code>repeated .HDNodePathType pubkeys = 1;</code> * * <pre> * pubkeys from multisig address (sorted lexicographically) * </pre> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder> getPubkeysBuilderList() { return getPubkeysFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder> getPubkeysFieldBuilder() { if (pubkeysBuilder_ == null) { pubkeysBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.HDNodePathTypeOrBuilder>( pubkeys_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); pubkeys_ = null; } return pubkeysBuilder_; } private java.util.List<com.google.protobuf.ByteString> signatures_ = java.util.Collections.emptyList(); private void ensureSignaturesIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { signatures_ = new java.util.ArrayList<com.google.protobuf.ByteString>(signatures_); bitField0_ |= 0x00000002; } } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public java.util.List<com.google.protobuf.ByteString> getSignaturesList() { return java.util.Collections.unmodifiableList(signatures_); } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public int getSignaturesCount() { return signatures_.size(); } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public com.google.protobuf.ByteString getSignatures(int index) { return signatures_.get(index); } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public Builder setSignatures( int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureSignaturesIsMutable(); signatures_.set(index, value); onChanged(); return this; } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public Builder addSignatures(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureSignaturesIsMutable(); signatures_.add(value); onChanged(); return this; } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public Builder addAllSignatures( java.lang.Iterable<? extends com.google.protobuf.ByteString> values) { ensureSignaturesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, signatures_); onChanged(); return this; } /** * <code>repeated bytes signatures = 2;</code> * * <pre> * existing signatures for partially signed input * </pre> */ public Builder clearSignatures() { signatures_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } private int m_ ; /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public boolean hasM() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public int getM() { return m_; } /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public Builder setM(int value) { bitField0_ |= 0x00000004; m_ = value; onChanged(); return this; } /** * <code>optional uint32 m = 3;</code> * * <pre> * "m" from n, how many valid signatures is necessary for spending * </pre> */ public Builder clearM() { bitField0_ = (bitField0_ & ~0x00000004); m_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:MultisigRedeemScriptType) } static { defaultInstance = new MultisigRedeemScriptType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:MultisigRedeemScriptType) } public interface TxInputTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxInputType) com.google.protobuf.MessageOrBuilder { /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ int getAddressN(int index); /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ boolean hasPrevHash(); /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ com.google.protobuf.ByteString getPrevHash(); /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ boolean hasPrevIndex(); /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ int getPrevIndex(); /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ boolean hasScriptSig(); /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ com.google.protobuf.ByteString getScriptSig(); /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ boolean hasSequence(); /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ int getSequence(); /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ boolean hasScriptType(); /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType getScriptType(); /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ boolean hasMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder(); } /** * Protobuf type {@code TxInputType} * * <pre> ** * Structure representing transaction input * @used_in SimpleSignTx * @used_in TransactionType * </pre> */ public static final class TxInputType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxInputType) TxInputTypeOrBuilder { // Use TxInputType.newBuilder() to construct. private TxInputType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxInputType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxInputType defaultInstance; public static TxInputType getDefaultInstance() { return defaultInstance; } public TxInputType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxInputType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } addressN_.add(input.readUInt32()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 18: { bitField0_ |= 0x00000001; prevHash_ = input.readBytes(); break; } case 24: { bitField0_ |= 0x00000002; prevIndex_ = input.readUInt32(); break; } case 34: { bitField0_ |= 0x00000004; scriptSig_ = input.readBytes(); break; } case 40: { bitField0_ |= 0x00000008; sequence_ = input.readUInt32(); break; } case 48: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType value = com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(6, rawValue); } else { bitField0_ |= 0x00000010; scriptType_ = value; } break; } case 58: { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder subBuilder = null; if (((bitField0_ & 0x00000020) == 0x00000020)) { subBuilder = multisig_.toBuilder(); } multisig_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(multisig_); multisig_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000020; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxInputType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxInputType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder.class); } public static com.google.protobuf.Parser<TxInputType> PARSER = new com.google.protobuf.AbstractParser<TxInputType>() { public TxInputType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxInputType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxInputType> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_N_FIELD_NUMBER = 1; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int PREV_HASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString prevHash_; /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public boolean hasPrevHash() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public com.google.protobuf.ByteString getPrevHash() { return prevHash_; } public static final int PREV_INDEX_FIELD_NUMBER = 3; private int prevIndex_; /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public boolean hasPrevIndex() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public int getPrevIndex() { return prevIndex_; } public static final int SCRIPT_SIG_FIELD_NUMBER = 4; private com.google.protobuf.ByteString scriptSig_; /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public boolean hasScriptSig() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public com.google.protobuf.ByteString getScriptSig() { return scriptSig_; } public static final int SEQUENCE_FIELD_NUMBER = 5; private int sequence_; /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public boolean hasSequence() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public int getSequence() { return sequence_; } public static final int SCRIPT_TYPE_FIELD_NUMBER = 6; private com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType scriptType_; /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public boolean hasScriptType() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType getScriptType() { return scriptType_; } public static final int MULTISIG_FIELD_NUMBER = 7; private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_; /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { return multisig_; } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { return multisig_; } private void initFields() { addressN_ = java.util.Collections.emptyList(); prevHash_ = com.google.protobuf.ByteString.EMPTY; prevIndex_ = 0; scriptSig_ = com.google.protobuf.ByteString.EMPTY; sequence_ = -1; scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType.SPENDADDRESS; multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasPrevHash()) { memoizedIsInitialized = 0; return false; } if (!hasPrevIndex()) { memoizedIsInitialized = 0; return false; } if (hasMultisig()) { if (!getMultisig().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(1, addressN_.get(i)); } if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(2, prevHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(3, prevIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(4, scriptSig_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt32(5, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeEnum(6, scriptType_.getNumber()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeMessage(7, multisig_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, prevHash_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(3, prevIndex_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(4, scriptSig_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(5, sequence_); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, scriptType_.getNumber()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, multisig_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxInputType} * * <pre> ** * Structure representing transaction input * @used_in SimpleSignTx * @used_in TransactionType * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxInputType) com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxInputType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxInputType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getMultisigFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); prevHash_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); prevIndex_ = 0; bitField0_ = (bitField0_ & ~0x00000004); scriptSig_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); sequence_ = -1; bitField0_ = (bitField0_ & ~0x00000010); scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType.SPENDADDRESS; bitField0_ = (bitField0_ & ~0x00000020); if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxInputType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType build() { com.satoshilabs.trezor.protobuf.TrezorType.TxInputType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TxInputType result = new com.satoshilabs.trezor.protobuf.TrezorType.TxInputType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000001); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000001; } result.prevHash_ = prevHash_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.prevIndex_ = prevIndex_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.scriptSig_ = scriptSig_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } result.sequence_ = sequence_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } result.scriptType_ = scriptType_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000020; } if (multisigBuilder_ == null) { result.multisig_ = multisig_; } else { result.multisig_ = multisigBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TxInputType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TxInputType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance()) return this; if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasPrevHash()) { setPrevHash(other.getPrevHash()); } if (other.hasPrevIndex()) { setPrevIndex(other.getPrevIndex()); } if (other.hasScriptSig()) { setScriptSig(other.getScriptSig()); } if (other.hasSequence()) { setSequence(other.getSequence()); } if (other.hasScriptType()) { setScriptType(other.getScriptType()); } if (other.hasMultisig()) { mergeMultisig(other.getMultisig()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasPrevHash()) { return false; } if (!hasPrevIndex()) { return false; } if (hasMultisig()) { if (!getMultisig().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TxInputType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TxInputType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000001; } } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 1;</code> * * <pre> * BIP-32 path to derive the key from master node * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } private com.google.protobuf.ByteString prevHash_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public boolean hasPrevHash() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public com.google.protobuf.ByteString getPrevHash() { return prevHash_; } /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public Builder setPrevHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; prevHash_ = value; onChanged(); return this; } /** * <code>required bytes prev_hash = 2;</code> * * <pre> * hash of previous transaction output to spend by this input * </pre> */ public Builder clearPrevHash() { bitField0_ = (bitField0_ & ~0x00000002); prevHash_ = getDefaultInstance().getPrevHash(); onChanged(); return this; } private int prevIndex_ ; /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public boolean hasPrevIndex() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public int getPrevIndex() { return prevIndex_; } /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public Builder setPrevIndex(int value) { bitField0_ |= 0x00000004; prevIndex_ = value; onChanged(); return this; } /** * <code>required uint32 prev_index = 3;</code> * * <pre> * index of previous output to spend * </pre> */ public Builder clearPrevIndex() { bitField0_ = (bitField0_ & ~0x00000004); prevIndex_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString scriptSig_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public boolean hasScriptSig() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public com.google.protobuf.ByteString getScriptSig() { return scriptSig_; } /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public Builder setScriptSig(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; scriptSig_ = value; onChanged(); return this; } /** * <code>optional bytes script_sig = 4;</code> * * <pre> * script signature, unset for tx to sign * </pre> */ public Builder clearScriptSig() { bitField0_ = (bitField0_ & ~0x00000008); scriptSig_ = getDefaultInstance().getScriptSig(); onChanged(); return this; } private int sequence_ = -1; /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public boolean hasSequence() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public int getSequence() { return sequence_; } /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public Builder setSequence(int value) { bitField0_ |= 0x00000010; sequence_ = value; onChanged(); return this; } /** * <code>optional uint32 sequence = 5 [default = 4294967295];</code> * * <pre> * sequence * </pre> */ public Builder clearSequence() { bitField0_ = (bitField0_ & ~0x00000010); sequence_ = -1; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType.SPENDADDRESS; /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public boolean hasScriptType() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType getScriptType() { return scriptType_; } /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public Builder setScriptType(com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; scriptType_ = value; onChanged(); return this; } /** * <code>optional .InputScriptType script_type = 6 [default = SPENDADDRESS];</code> * * <pre> * defines template of input script * </pre> */ public Builder clearScriptType() { bitField0_ = (bitField0_ & ~0x00000020); scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.InputScriptType.SPENDADDRESS; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> multisigBuilder_; /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { if (multisigBuilder_ == null) { return multisig_; } else { return multisigBuilder_.getMessage(); } } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public Builder setMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } multisig_ = value; onChanged(); } else { multisigBuilder_.setMessage(value); } bitField0_ |= 0x00000040; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public Builder setMultisig( com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder builderForValue) { if (multisigBuilder_ == null) { multisig_ = builderForValue.build(); onChanged(); } else { multisigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public Builder mergeMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (((bitField0_ & 0x00000040) == 0x00000040) && multisig_ != com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance()) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.newBuilder(multisig_).mergeFrom(value).buildPartial(); } else { multisig_ = value; } onChanged(); } else { multisigBuilder_.mergeFrom(value); } bitField0_ |= 0x00000040; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public Builder clearMultisig() { if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); onChanged(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000040); return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder getMultisigBuilder() { bitField0_ |= 0x00000040; onChanged(); return getMultisigFieldBuilder().getBuilder(); } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { if (multisigBuilder_ != null) { return multisigBuilder_.getMessageOrBuilder(); } else { return multisig_; } } /** * <code>optional .MultisigRedeemScriptType multisig = 7;</code> * * <pre> * Filled if input is going to spend multisig tx * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> getMultisigFieldBuilder() { if (multisigBuilder_ == null) { multisigBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder>( getMultisig(), getParentForChildren(), isClean()); multisig_ = null; } return multisigBuilder_; } // @@protoc_insertion_point(builder_scope:TxInputType) } static { defaultInstance = new TxInputType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxInputType) } public interface TxOutputTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxOutputType) com.google.protobuf.MessageOrBuilder { /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ boolean hasAddress(); /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ java.lang.String getAddress(); /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ com.google.protobuf.ByteString getAddressBytes(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ java.util.List<java.lang.Integer> getAddressNList(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ int getAddressNCount(); /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ int getAddressN(int index); /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ boolean hasAmount(); /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ long getAmount(); /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ boolean hasScriptType(); /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType getScriptType(); /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ boolean hasMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig(); /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder(); } /** * Protobuf type {@code TxOutputType} * * <pre> ** * Structure representing transaction output * @used_in SimpleSignTx * @used_in TransactionType * </pre> */ public static final class TxOutputType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxOutputType) TxOutputTypeOrBuilder { // Use TxOutputType.newBuilder() to construct. private TxOutputType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxOutputType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxOutputType defaultInstance; public static TxOutputType getDefaultInstance() { return defaultInstance; } public TxOutputType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxOutputType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; address_ = bs; break; } case 16: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000002; } addressN_.add(input.readUInt32()); break; } case 18: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) { addressN_ = new java.util.ArrayList<java.lang.Integer>(); mutable_bitField0_ |= 0x00000002; } while (input.getBytesUntilLimit() > 0) { addressN_.add(input.readUInt32()); } input.popLimit(limit); break; } case 24: { bitField0_ |= 0x00000002; amount_ = input.readUInt64(); break; } case 32: { int rawValue = input.readEnum(); com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType value = com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType.valueOf(rawValue); if (value == null) { unknownFields.mergeVarintField(4, rawValue); } else { bitField0_ |= 0x00000004; scriptType_ = value; } break; } case 42: { com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder subBuilder = null; if (((bitField0_ & 0x00000008) == 0x00000008)) { subBuilder = multisig_.toBuilder(); } multisig_ = input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(multisig_); multisig_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000008; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder.class); } public static com.google.protobuf.Parser<TxOutputType> PARSER = new com.google.protobuf.AbstractParser<TxOutputType>() { public TxOutputType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxOutputType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxOutputType> getParserForType() { return PARSER; } private int bitField0_; public static final int ADDRESS_FIELD_NUMBER = 1; private java.lang.Object address_; /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ADDRESS_N_FIELD_NUMBER = 2; private java.util.List<java.lang.Integer> addressN_; /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return addressN_; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } public static final int AMOUNT_FIELD_NUMBER = 3; private long amount_; /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public boolean hasAmount() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public long getAmount() { return amount_; } public static final int SCRIPT_TYPE_FIELD_NUMBER = 4; private com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType scriptType_; /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public boolean hasScriptType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType getScriptType() { return scriptType_; } public static final int MULTISIG_FIELD_NUMBER = 5; private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_; /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { return multisig_; } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { return multisig_; } private void initFields() { address_ = ""; addressN_ = java.util.Collections.emptyList(); amount_ = 0L; scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType.PAYTOADDRESS; multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasAmount()) { memoizedIsInitialized = 0; return false; } if (!hasScriptType()) { memoizedIsInitialized = 0; return false; } if (hasMultisig()) { if (!getMultisig().isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBytes(1, getAddressBytes()); } for (int i = 0; i < addressN_.size(); i++) { output.writeUInt32(2, addressN_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt64(3, amount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeEnum(4, scriptType_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeMessage(5, multisig_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, getAddressBytes()); } { int dataSize = 0; for (int i = 0; i < addressN_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(addressN_.get(i)); } size += dataSize; size += 1 * getAddressNList().size(); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(3, amount_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, scriptType_.getNumber()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, multisig_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxOutputType} * * <pre> ** * Structure representing transaction output * @used_in SimpleSignTx * @used_in TransactionType * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxOutputType) com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getMultisigFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); address_ = ""; bitField0_ = (bitField0_ & ~0x00000001); addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); amount_ = 0L; bitField0_ = (bitField0_ & ~0x00000004); scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType.PAYTOADDRESS; bitField0_ = (bitField0_ & ~0x00000008); if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType build() { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType result = new com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.address_ = address_; if (((bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = java.util.Collections.unmodifiableList(addressN_); bitField0_ = (bitField0_ & ~0x00000002); } result.addressN_ = addressN_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } result.amount_ = amount_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } result.scriptType_ = scriptType_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } if (multisigBuilder_ == null) { result.multisig_ = multisig_; } else { result.multisig_ = multisigBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance()) return this; if (other.hasAddress()) { bitField0_ |= 0x00000001; address_ = other.address_; onChanged(); } if (!other.addressN_.isEmpty()) { if (addressN_.isEmpty()) { addressN_ = other.addressN_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureAddressNIsMutable(); addressN_.addAll(other.addressN_); } onChanged(); } if (other.hasAmount()) { setAmount(other.getAmount()); } if (other.hasScriptType()) { setScriptType(other.getScriptType()); } if (other.hasMultisig()) { mergeMultisig(other.getMultisig()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasAmount()) { return false; } if (!hasScriptType()) { return false; } if (hasMultisig()) { if (!getMultisig().isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object address_ = ""; /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public boolean hasAddress() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public java.lang.String getAddress() { java.lang.Object ref = address_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { address_ = s; } return s; } else { return (java.lang.String) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public com.google.protobuf.ByteString getAddressBytes() { java.lang.Object ref = address_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); address_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public Builder setAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public Builder clearAddress() { bitField0_ = (bitField0_ & ~0x00000001); address_ = getDefaultInstance().getAddress(); onChanged(); return this; } /** * <code>optional string address = 1;</code> * * <pre> * target coin address in Base58 encoding * </pre> */ public Builder setAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; address_ = value; onChanged(); return this; } private java.util.List<java.lang.Integer> addressN_ = java.util.Collections.emptyList(); private void ensureAddressNIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { addressN_ = new java.util.ArrayList<java.lang.Integer>(addressN_); bitField0_ |= 0x00000002; } } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public java.util.List<java.lang.Integer> getAddressNList() { return java.util.Collections.unmodifiableList(addressN_); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public int getAddressNCount() { return addressN_.size(); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public int getAddressN(int index) { return addressN_.get(index); } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public Builder setAddressN( int index, int value) { ensureAddressNIsMutable(); addressN_.set(index, value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public Builder addAddressN(int value) { ensureAddressNIsMutable(); addressN_.add(value); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public Builder addAllAddressN( java.lang.Iterable<? extends java.lang.Integer> values) { ensureAddressNIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, addressN_); onChanged(); return this; } /** * <code>repeated uint32 address_n = 2;</code> * * <pre> * BIP-32 path to derive the key from master node; has higher priority than "address" * </pre> */ public Builder clearAddressN() { addressN_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } private long amount_ ; /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public boolean hasAmount() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public long getAmount() { return amount_; } /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public Builder setAmount(long value) { bitField0_ |= 0x00000004; amount_ = value; onChanged(); return this; } /** * <code>required uint64 amount = 3;</code> * * <pre> * amount to spend in satoshis * </pre> */ public Builder clearAmount() { bitField0_ = (bitField0_ & ~0x00000004); amount_ = 0L; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType.PAYTOADDRESS; /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public boolean hasScriptType() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType getScriptType() { return scriptType_; } /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public Builder setScriptType(com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; scriptType_ = value; onChanged(); return this; } /** * <code>required .OutputScriptType script_type = 4;</code> * * <pre> * output script type * </pre> */ public Builder clearScriptType() { bitField0_ = (bitField0_ & ~0x00000008); scriptType_ = com.satoshilabs.trezor.protobuf.TrezorType.OutputScriptType.PAYTOADDRESS; onChanged(); return this; } private com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> multisigBuilder_; /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public boolean hasMultisig() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType getMultisig() { if (multisigBuilder_ == null) { return multisig_; } else { return multisigBuilder_.getMessage(); } } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public Builder setMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } multisig_ = value; onChanged(); } else { multisigBuilder_.setMessage(value); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public Builder setMultisig( com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder builderForValue) { if (multisigBuilder_ == null) { multisig_ = builderForValue.build(); onChanged(); } else { multisigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public Builder mergeMultisig(com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType value) { if (multisigBuilder_ == null) { if (((bitField0_ & 0x00000010) == 0x00000010) && multisig_ != com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance()) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.newBuilder(multisig_).mergeFrom(value).buildPartial(); } else { multisig_ = value; } onChanged(); } else { multisigBuilder_.mergeFrom(value); } bitField0_ |= 0x00000010; return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public Builder clearMultisig() { if (multisigBuilder_ == null) { multisig_ = com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.getDefaultInstance(); onChanged(); } else { multisigBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); return this; } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder getMultisigBuilder() { bitField0_ |= 0x00000010; onChanged(); return getMultisigFieldBuilder().getBuilder(); } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ public com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder getMultisigOrBuilder() { if (multisigBuilder_ != null) { return multisigBuilder_.getMessageOrBuilder(); } else { return multisig_; } } /** * <code>optional .MultisigRedeemScriptType multisig = 5;</code> * * <pre> * Defines multisig address; script_type must be PAYTOMULTISIG * </pre> */ private com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder> getMultisigFieldBuilder() { if (multisigBuilder_ == null) { multisigBuilder_ = new com.google.protobuf.SingleFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.MultisigRedeemScriptTypeOrBuilder>( getMultisig(), getParentForChildren(), isClean()); multisig_ = null; } return multisigBuilder_; } // @@protoc_insertion_point(builder_scope:TxOutputType) } static { defaultInstance = new TxOutputType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxOutputType) } public interface TxOutputBinTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxOutputBinType) com.google.protobuf.MessageOrBuilder { /** * <code>required uint64 amount = 1;</code> */ boolean hasAmount(); /** * <code>required uint64 amount = 1;</code> */ long getAmount(); /** * <code>required bytes script_pubkey = 2;</code> */ boolean hasScriptPubkey(); /** * <code>required bytes script_pubkey = 2;</code> */ com.google.protobuf.ByteString getScriptPubkey(); } /** * Protobuf type {@code TxOutputBinType} * * <pre> ** * Structure representing compiled transaction output * @used_in TransactionType * </pre> */ public static final class TxOutputBinType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxOutputBinType) TxOutputBinTypeOrBuilder { // Use TxOutputBinType.newBuilder() to construct. private TxOutputBinType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxOutputBinType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxOutputBinType defaultInstance; public static TxOutputBinType getDefaultInstance() { return defaultInstance; } public TxOutputBinType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxOutputBinType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; amount_ = input.readUInt64(); break; } case 18: { bitField0_ |= 0x00000002; scriptPubkey_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputBinType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputBinType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder.class); } public static com.google.protobuf.Parser<TxOutputBinType> PARSER = new com.google.protobuf.AbstractParser<TxOutputBinType>() { public TxOutputBinType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxOutputBinType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxOutputBinType> getParserForType() { return PARSER; } private int bitField0_; public static final int AMOUNT_FIELD_NUMBER = 1; private long amount_; /** * <code>required uint64 amount = 1;</code> */ public boolean hasAmount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint64 amount = 1;</code> */ public long getAmount() { return amount_; } public static final int SCRIPT_PUBKEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString scriptPubkey_; /** * <code>required bytes script_pubkey = 2;</code> */ public boolean hasScriptPubkey() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required bytes script_pubkey = 2;</code> */ public com.google.protobuf.ByteString getScriptPubkey() { return scriptPubkey_; } private void initFields() { amount_ = 0L; scriptPubkey_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasAmount()) { memoizedIsInitialized = 0; return false; } if (!hasScriptPubkey()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt64(1, amount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, scriptPubkey_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(1, amount_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, scriptPubkey_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxOutputBinType} * * <pre> ** * Structure representing compiled transaction output * @used_in TransactionType * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxOutputBinType) com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputBinType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputBinType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); amount_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); scriptPubkey_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxOutputBinType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType build() { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType result = new com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.amount_ = amount_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.scriptPubkey_ = scriptPubkey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.getDefaultInstance()) return this; if (other.hasAmount()) { setAmount(other.getAmount()); } if (other.hasScriptPubkey()) { setScriptPubkey(other.getScriptPubkey()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return hasAmount() && hasScriptPubkey(); } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private long amount_ ; /** * <code>required uint64 amount = 1;</code> */ public boolean hasAmount() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required uint64 amount = 1;</code> */ public long getAmount() { return amount_; } /** * <code>required uint64 amount = 1;</code> */ public Builder setAmount(long value) { bitField0_ |= 0x00000001; amount_ = value; onChanged(); return this; } /** * <code>required uint64 amount = 1;</code> */ public Builder clearAmount() { bitField0_ = (bitField0_ & ~0x00000001); amount_ = 0L; onChanged(); return this; } private com.google.protobuf.ByteString scriptPubkey_ = com.google.protobuf.ByteString.EMPTY; /** * <code>required bytes script_pubkey = 2;</code> */ public boolean hasScriptPubkey() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>required bytes script_pubkey = 2;</code> */ public com.google.protobuf.ByteString getScriptPubkey() { return scriptPubkey_; } /** * <code>required bytes script_pubkey = 2;</code> */ public Builder setScriptPubkey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; scriptPubkey_ = value; onChanged(); return this; } /** * <code>required bytes script_pubkey = 2;</code> */ public Builder clearScriptPubkey() { bitField0_ = (bitField0_ & ~0x00000002); scriptPubkey_ = getDefaultInstance().getScriptPubkey(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:TxOutputBinType) } static { defaultInstance = new TxOutputBinType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxOutputBinType) } public interface TransactionTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TransactionType) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 version = 1;</code> */ boolean hasVersion(); /** * <code>optional uint32 version = 1;</code> */ int getVersion(); /** * <code>repeated .TxInputType inputs = 2;</code> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList(); /** * <code>repeated .TxInputType inputs = 2;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index); /** * <code>repeated .TxInputType inputs = 2;</code> */ int getInputsCount(); /** * <code>repeated .TxInputType inputs = 2;</code> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList(); /** * <code>repeated .TxInputType inputs = 2;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index); /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> getBinOutputsList(); /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType getBinOutputs(int index); /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ int getBinOutputsCount(); /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder> getBinOutputsOrBuilderList(); /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder getBinOutputsOrBuilder( int index); /** * <code>repeated .TxOutputType outputs = 5;</code> */ java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList(); /** * <code>repeated .TxOutputType outputs = 5;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index); /** * <code>repeated .TxOutputType outputs = 5;</code> */ int getOutputsCount(); /** * <code>repeated .TxOutputType outputs = 5;</code> */ java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList(); /** * <code>repeated .TxOutputType outputs = 5;</code> */ com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index); /** * <code>optional uint32 lock_time = 4;</code> */ boolean hasLockTime(); /** * <code>optional uint32 lock_time = 4;</code> */ int getLockTime(); /** * <code>optional uint32 inputs_cnt = 6;</code> */ boolean hasInputsCnt(); /** * <code>optional uint32 inputs_cnt = 6;</code> */ int getInputsCnt(); /** * <code>optional uint32 outputs_cnt = 7;</code> */ boolean hasOutputsCnt(); /** * <code>optional uint32 outputs_cnt = 7;</code> */ int getOutputsCnt(); } /** * Protobuf type {@code TransactionType} * * <pre> ** * Structure representing transaction * @used_in SimpleSignTx * </pre> */ public static final class TransactionType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TransactionType) TransactionTypeOrBuilder { // Use TransactionType.newBuilder() to construct. private TransactionType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TransactionType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TransactionType defaultInstance; public static TransactionType getDefaultInstance() { return defaultInstance; } public TransactionType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TransactionType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; version_ = input.readUInt32(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { inputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType>(); mutable_bitField0_ |= 0x00000002; } inputs_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.PARSER, extensionRegistry)); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { binOutputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType>(); mutable_bitField0_ |= 0x00000004; } binOutputs_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.PARSER, extensionRegistry)); break; } case 32: { bitField0_ |= 0x00000002; lockTime_ = input.readUInt32(); break; } case 42: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { outputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType>(); mutable_bitField0_ |= 0x00000008; } outputs_.add(input.readMessage(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.PARSER, extensionRegistry)); break; } case 48: { bitField0_ |= 0x00000004; inputsCnt_ = input.readUInt32(); break; } case 56: { bitField0_ |= 0x00000008; outputsCnt_ = input.readUInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { inputs_ = java.util.Collections.unmodifiableList(inputs_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { binOutputs_ = java.util.Collections.unmodifiableList(binOutputs_); } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TransactionType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TransactionType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.class, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder.class); } public static com.google.protobuf.Parser<TransactionType> PARSER = new com.google.protobuf.AbstractParser<TransactionType>() { public TransactionType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TransactionType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TransactionType> getParserForType() { return PARSER; } private int bitField0_; public static final int VERSION_FIELD_NUMBER = 1; private int version_; /** * <code>optional uint32 version = 1;</code> */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 version = 1;</code> */ public int getVersion() { return version_; } public static final int INPUTS_FIELD_NUMBER = 2; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> inputs_; /** * <code>repeated .TxInputType inputs = 2;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList() { return inputs_; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList() { return inputs_; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public int getInputsCount() { return inputs_.size(); } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index) { return inputs_.get(index); } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index) { return inputs_.get(index); } public static final int BIN_OUTPUTS_FIELD_NUMBER = 3; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> binOutputs_; /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> getBinOutputsList() { return binOutputs_; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder> getBinOutputsOrBuilderList() { return binOutputs_; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public int getBinOutputsCount() { return binOutputs_.size(); } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType getBinOutputs(int index) { return binOutputs_.get(index); } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder getBinOutputsOrBuilder( int index) { return binOutputs_.get(index); } public static final int OUTPUTS_FIELD_NUMBER = 5; private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> outputs_; /** * <code>repeated .TxOutputType outputs = 5;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList() { return outputs_; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList() { return outputs_; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public int getOutputsCount() { return outputs_.size(); } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index) { return outputs_.get(index); } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index) { return outputs_.get(index); } public static final int LOCK_TIME_FIELD_NUMBER = 4; private int lockTime_; /** * <code>optional uint32 lock_time = 4;</code> */ public boolean hasLockTime() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional uint32 lock_time = 4;</code> */ public int getLockTime() { return lockTime_; } public static final int INPUTS_CNT_FIELD_NUMBER = 6; private int inputsCnt_; /** * <code>optional uint32 inputs_cnt = 6;</code> */ public boolean hasInputsCnt() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional uint32 inputs_cnt = 6;</code> */ public int getInputsCnt() { return inputsCnt_; } public static final int OUTPUTS_CNT_FIELD_NUMBER = 7; private int outputsCnt_; /** * <code>optional uint32 outputs_cnt = 7;</code> */ public boolean hasOutputsCnt() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** * <code>optional uint32 outputs_cnt = 7;</code> */ public int getOutputsCnt() { return outputsCnt_; } private void initFields() { version_ = 0; inputs_ = java.util.Collections.emptyList(); binOutputs_ = java.util.Collections.emptyList(); outputs_ = java.util.Collections.emptyList(); lockTime_ = 0; inputsCnt_ = 0; outputsCnt_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; for (int i = 0; i < getInputsCount(); i++) { if (!getInputs(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } for (int i = 0; i < getBinOutputsCount(); i++) { if (!getBinOutputs(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, version_); } for (int i = 0; i < inputs_.size(); i++) { output.writeMessage(2, inputs_.get(i)); } for (int i = 0; i < binOutputs_.size(); i++) { output.writeMessage(3, binOutputs_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeUInt32(4, lockTime_); } for (int i = 0; i < outputs_.size(); i++) { output.writeMessage(5, outputs_.get(i)); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeUInt32(6, inputsCnt_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeUInt32(7, outputsCnt_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, version_); } for (int i = 0; i < inputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, inputs_.get(i)); } for (int i = 0; i < binOutputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, binOutputs_.get(i)); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(4, lockTime_); } for (int i = 0; i < outputs_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, outputs_.get(i)); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(6, inputsCnt_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(7, outputsCnt_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TransactionType} * * <pre> ** * Structure representing transaction * @used_in SimpleSignTx * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TransactionType) com.satoshilabs.trezor.protobuf.TrezorType.TransactionTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TransactionType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TransactionType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.class, com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getInputsFieldBuilder(); getBinOutputsFieldBuilder(); getOutputsFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); version_ = 0; bitField0_ = (bitField0_ & ~0x00000001); if (inputsBuilder_ == null) { inputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { inputsBuilder_.clear(); } if (binOutputsBuilder_ == null) { binOutputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { binOutputsBuilder_.clear(); } if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { outputsBuilder_.clear(); } lockTime_ = 0; bitField0_ = (bitField0_ & ~0x00000010); inputsCnt_ = 0; bitField0_ = (bitField0_ & ~0x00000020); outputsCnt_ = 0; bitField0_ = (bitField0_ & ~0x00000040); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TransactionType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType build() { com.satoshilabs.trezor.protobuf.TrezorType.TransactionType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TransactionType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TransactionType result = new com.satoshilabs.trezor.protobuf.TrezorType.TransactionType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.version_ = version_; if (inputsBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { inputs_ = java.util.Collections.unmodifiableList(inputs_); bitField0_ = (bitField0_ & ~0x00000002); } result.inputs_ = inputs_; } else { result.inputs_ = inputsBuilder_.build(); } if (binOutputsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { binOutputs_ = java.util.Collections.unmodifiableList(binOutputs_); bitField0_ = (bitField0_ & ~0x00000004); } result.binOutputs_ = binOutputs_; } else { result.binOutputs_ = binOutputsBuilder_.build(); } if (outputsBuilder_ == null) { if (((bitField0_ & 0x00000008) == 0x00000008)) { outputs_ = java.util.Collections.unmodifiableList(outputs_); bitField0_ = (bitField0_ & ~0x00000008); } result.outputs_ = outputs_; } else { result.outputs_ = outputsBuilder_.build(); } if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000002; } result.lockTime_ = lockTime_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000004; } result.inputsCnt_ = inputsCnt_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000008; } result.outputsCnt_ = outputsCnt_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TransactionType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TransactionType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TransactionType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TransactionType.getDefaultInstance()) return this; if (other.hasVersion()) { setVersion(other.getVersion()); } if (inputsBuilder_ == null) { if (!other.inputs_.isEmpty()) { if (inputs_.isEmpty()) { inputs_ = other.inputs_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureInputsIsMutable(); inputs_.addAll(other.inputs_); } onChanged(); } } else { if (!other.inputs_.isEmpty()) { if (inputsBuilder_.isEmpty()) { inputsBuilder_.dispose(); inputsBuilder_ = null; inputs_ = other.inputs_; bitField0_ = (bitField0_ & ~0x00000002); inputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getInputsFieldBuilder() : null; } else { inputsBuilder_.addAllMessages(other.inputs_); } } } if (binOutputsBuilder_ == null) { if (!other.binOutputs_.isEmpty()) { if (binOutputs_.isEmpty()) { binOutputs_ = other.binOutputs_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureBinOutputsIsMutable(); binOutputs_.addAll(other.binOutputs_); } onChanged(); } } else { if (!other.binOutputs_.isEmpty()) { if (binOutputsBuilder_.isEmpty()) { binOutputsBuilder_.dispose(); binOutputsBuilder_ = null; binOutputs_ = other.binOutputs_; bitField0_ = (bitField0_ & ~0x00000004); binOutputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getBinOutputsFieldBuilder() : null; } else { binOutputsBuilder_.addAllMessages(other.binOutputs_); } } } if (outputsBuilder_ == null) { if (!other.outputs_.isEmpty()) { if (outputs_.isEmpty()) { outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureOutputsIsMutable(); outputs_.addAll(other.outputs_); } onChanged(); } } else { if (!other.outputs_.isEmpty()) { if (outputsBuilder_.isEmpty()) { outputsBuilder_.dispose(); outputsBuilder_ = null; outputs_ = other.outputs_; bitField0_ = (bitField0_ & ~0x00000008); outputsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getOutputsFieldBuilder() : null; } else { outputsBuilder_.addAllMessages(other.outputs_); } } } if (other.hasLockTime()) { setLockTime(other.getLockTime()); } if (other.hasInputsCnt()) { setInputsCnt(other.getInputsCnt()); } if (other.hasOutputsCnt()) { setOutputsCnt(other.getOutputsCnt()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { for (int i = 0; i < getInputsCount(); i++) { if (!getInputs(i).isInitialized()) { return false; } } for (int i = 0; i < getBinOutputsCount(); i++) { if (!getBinOutputs(i).isInitialized()) { return false; } } for (int i = 0; i < getOutputsCount(); i++) { if (!getOutputs(i).isInitialized()) { return false; } } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TransactionType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TransactionType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int version_ ; /** * <code>optional uint32 version = 1;</code> */ public boolean hasVersion() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 version = 1;</code> */ public int getVersion() { return version_; } /** * <code>optional uint32 version = 1;</code> */ public Builder setVersion(int value) { bitField0_ |= 0x00000001; version_ = value; onChanged(); return this; } /** * <code>optional uint32 version = 1;</code> */ public Builder clearVersion() { bitField0_ = (bitField0_ & ~0x00000001); version_ = 0; onChanged(); return this; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> inputs_ = java.util.Collections.emptyList(); private void ensureInputsIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { inputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType>(inputs_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> inputsBuilder_; /** * <code>repeated .TxInputType inputs = 2;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> getInputsList() { if (inputsBuilder_ == null) { return java.util.Collections.unmodifiableList(inputs_); } else { return inputsBuilder_.getMessageList(); } } /** * <code>repeated .TxInputType inputs = 2;</code> */ public int getInputsCount() { if (inputsBuilder_ == null) { return inputs_.size(); } else { return inputsBuilder_.getCount(); } } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType getInputs(int index) { if (inputsBuilder_ == null) { return inputs_.get(index); } else { return inputsBuilder_.getMessage(index); } } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder setInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.set(index, value); onChanged(); } else { inputsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder setInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.set(index, builderForValue.build()); onChanged(); } else { inputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder addInputs(com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.add(value); onChanged(); } else { inputsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder addInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType value) { if (inputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureInputsIsMutable(); inputs_.add(index, value); onChanged(); } else { inputsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder addInputs( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.add(builderForValue.build()); onChanged(); } else { inputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder addInputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder builderForValue) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.add(index, builderForValue.build()); onChanged(); } else { inputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder addAllInputs( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputType> values) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, inputs_); onChanged(); } else { inputsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder clearInputs() { if (inputsBuilder_ == null) { inputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { inputsBuilder_.clear(); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public Builder removeInputs(int index) { if (inputsBuilder_ == null) { ensureInputsIsMutable(); inputs_.remove(index); onChanged(); } else { inputsBuilder_.remove(index); } return this; } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder getInputsBuilder( int index) { return getInputsFieldBuilder().getBuilder(index); } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder getInputsOrBuilder( int index) { if (inputsBuilder_ == null) { return inputs_.get(index); } else { return inputsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TxInputType inputs = 2;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsOrBuilderList() { if (inputsBuilder_ != null) { return inputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(inputs_); } } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder addInputsBuilder() { return getInputsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance()); } /** * <code>repeated .TxInputType inputs = 2;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder addInputsBuilder( int index) { return getInputsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.getDefaultInstance()); } /** * <code>repeated .TxInputType inputs = 2;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder> getInputsBuilderList() { return getInputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder> getInputsFieldBuilder() { if (inputsBuilder_ == null) { inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxInputType, com.satoshilabs.trezor.protobuf.TrezorType.TxInputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxInputTypeOrBuilder>( inputs_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); inputs_ = null; } return inputsBuilder_; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> binOutputs_ = java.util.Collections.emptyList(); private void ensureBinOutputsIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { binOutputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType>(binOutputs_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder> binOutputsBuilder_; /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> getBinOutputsList() { if (binOutputsBuilder_ == null) { return java.util.Collections.unmodifiableList(binOutputs_); } else { return binOutputsBuilder_.getMessageList(); } } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public int getBinOutputsCount() { if (binOutputsBuilder_ == null) { return binOutputs_.size(); } else { return binOutputsBuilder_.getCount(); } } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType getBinOutputs(int index) { if (binOutputsBuilder_ == null) { return binOutputs_.get(index); } else { return binOutputsBuilder_.getMessage(index); } } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder setBinOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType value) { if (binOutputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBinOutputsIsMutable(); binOutputs_.set(index, value); onChanged(); } else { binOutputsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder setBinOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder builderForValue) { if (binOutputsBuilder_ == null) { ensureBinOutputsIsMutable(); binOutputs_.set(index, builderForValue.build()); onChanged(); } else { binOutputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder addBinOutputs(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType value) { if (binOutputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBinOutputsIsMutable(); binOutputs_.add(value); onChanged(); } else { binOutputsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder addBinOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType value) { if (binOutputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBinOutputsIsMutable(); binOutputs_.add(index, value); onChanged(); } else { binOutputsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder addBinOutputs( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder builderForValue) { if (binOutputsBuilder_ == null) { ensureBinOutputsIsMutable(); binOutputs_.add(builderForValue.build()); onChanged(); } else { binOutputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder addBinOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder builderForValue) { if (binOutputsBuilder_ == null) { ensureBinOutputsIsMutable(); binOutputs_.add(index, builderForValue.build()); onChanged(); } else { binOutputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder addAllBinOutputs( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType> values) { if (binOutputsBuilder_ == null) { ensureBinOutputsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, binOutputs_); onChanged(); } else { binOutputsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder clearBinOutputs() { if (binOutputsBuilder_ == null) { binOutputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { binOutputsBuilder_.clear(); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public Builder removeBinOutputs(int index) { if (binOutputsBuilder_ == null) { ensureBinOutputsIsMutable(); binOutputs_.remove(index); onChanged(); } else { binOutputsBuilder_.remove(index); } return this; } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder getBinOutputsBuilder( int index) { return getBinOutputsFieldBuilder().getBuilder(index); } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder getBinOutputsOrBuilder( int index) { if (binOutputsBuilder_ == null) { return binOutputs_.get(index); } else { return binOutputsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder> getBinOutputsOrBuilderList() { if (binOutputsBuilder_ != null) { return binOutputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(binOutputs_); } } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder addBinOutputsBuilder() { return getBinOutputsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.getDefaultInstance()); } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder addBinOutputsBuilder( int index) { return getBinOutputsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.getDefaultInstance()); } /** * <code>repeated .TxOutputBinType bin_outputs = 3;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder> getBinOutputsBuilderList() { return getBinOutputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder> getBinOutputsFieldBuilder() { if (binOutputsBuilder_ == null) { binOutputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputBinTypeOrBuilder>( binOutputs_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); binOutputs_ = null; } return binOutputsBuilder_; } private java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> outputs_ = java.util.Collections.emptyList(); private void ensureOutputsIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { outputs_ = new java.util.ArrayList<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType>(outputs_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> outputsBuilder_; /** * <code>repeated .TxOutputType outputs = 5;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> getOutputsList() { if (outputsBuilder_ == null) { return java.util.Collections.unmodifiableList(outputs_); } else { return outputsBuilder_.getMessageList(); } } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public int getOutputsCount() { if (outputsBuilder_ == null) { return outputs_.size(); } else { return outputsBuilder_.getCount(); } } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType getOutputs(int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessage(index); } } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder setOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.set(index, value); onChanged(); } else { outputsBuilder_.setMessage(index, value); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder setOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.set(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder addOutputs(com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(value); onChanged(); } else { outputsBuilder_.addMessage(value); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder addOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType value) { if (outputsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureOutputsIsMutable(); outputs_.add(index, value); onChanged(); } else { outputsBuilder_.addMessage(index, value); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder addOutputs( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder addOutputs( int index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder builderForValue) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.add(index, builderForValue.build()); onChanged(); } else { outputsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder addAllOutputs( java.lang.Iterable<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType> values) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, outputs_); onChanged(); } else { outputsBuilder_.addAllMessages(values); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder clearOutputs() { if (outputsBuilder_ == null) { outputs_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { outputsBuilder_.clear(); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public Builder removeOutputs(int index) { if (outputsBuilder_ == null) { ensureOutputsIsMutable(); outputs_.remove(index); onChanged(); } else { outputsBuilder_.remove(index); } return this; } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder getOutputsBuilder( int index) { return getOutputsFieldBuilder().getBuilder(index); } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder getOutputsOrBuilder( int index) { if (outputsBuilder_ == null) { return outputs_.get(index); } else { return outputsBuilder_.getMessageOrBuilder(index); } } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public java.util.List<? extends com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsOrBuilderList() { if (outputsBuilder_ != null) { return outputsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(outputs_); } } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder addOutputsBuilder() { return getOutputsFieldBuilder().addBuilder( com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance()); } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder addOutputsBuilder( int index) { return getOutputsFieldBuilder().addBuilder( index, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.getDefaultInstance()); } /** * <code>repeated .TxOutputType outputs = 5;</code> */ public java.util.List<com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder> getOutputsBuilderList() { return getOutputsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder> getOutputsFieldBuilder() { if (outputsBuilder_ == null) { outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputType.Builder, com.satoshilabs.trezor.protobuf.TrezorType.TxOutputTypeOrBuilder>( outputs_, ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean()); outputs_ = null; } return outputsBuilder_; } private int lockTime_ ; /** * <code>optional uint32 lock_time = 4;</code> */ public boolean hasLockTime() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** * <code>optional uint32 lock_time = 4;</code> */ public int getLockTime() { return lockTime_; } /** * <code>optional uint32 lock_time = 4;</code> */ public Builder setLockTime(int value) { bitField0_ |= 0x00000010; lockTime_ = value; onChanged(); return this; } /** * <code>optional uint32 lock_time = 4;</code> */ public Builder clearLockTime() { bitField0_ = (bitField0_ & ~0x00000010); lockTime_ = 0; onChanged(); return this; } private int inputsCnt_ ; /** * <code>optional uint32 inputs_cnt = 6;</code> */ public boolean hasInputsCnt() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** * <code>optional uint32 inputs_cnt = 6;</code> */ public int getInputsCnt() { return inputsCnt_; } /** * <code>optional uint32 inputs_cnt = 6;</code> */ public Builder setInputsCnt(int value) { bitField0_ |= 0x00000020; inputsCnt_ = value; onChanged(); return this; } /** * <code>optional uint32 inputs_cnt = 6;</code> */ public Builder clearInputsCnt() { bitField0_ = (bitField0_ & ~0x00000020); inputsCnt_ = 0; onChanged(); return this; } private int outputsCnt_ ; /** * <code>optional uint32 outputs_cnt = 7;</code> */ public boolean hasOutputsCnt() { return ((bitField0_ & 0x00000040) == 0x00000040); } /** * <code>optional uint32 outputs_cnt = 7;</code> */ public int getOutputsCnt() { return outputsCnt_; } /** * <code>optional uint32 outputs_cnt = 7;</code> */ public Builder setOutputsCnt(int value) { bitField0_ |= 0x00000040; outputsCnt_ = value; onChanged(); return this; } /** * <code>optional uint32 outputs_cnt = 7;</code> */ public Builder clearOutputsCnt() { bitField0_ = (bitField0_ & ~0x00000040); outputsCnt_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:TransactionType) } static { defaultInstance = new TransactionType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransactionType) } public interface TxRequestDetailsTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxRequestDetailsType) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ boolean hasRequestIndex(); /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ int getRequestIndex(); /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ boolean hasTxHash(); /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ com.google.protobuf.ByteString getTxHash(); } /** * Protobuf type {@code TxRequestDetailsType} * * <pre> ** * Structure representing request details * @used_in TxRequest * </pre> */ public static final class TxRequestDetailsType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxRequestDetailsType) TxRequestDetailsTypeOrBuilder { // Use TxRequestDetailsType.newBuilder() to construct. private TxRequestDetailsType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxRequestDetailsType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxRequestDetailsType defaultInstance; public static TxRequestDetailsType getDefaultInstance() { return defaultInstance; } public TxRequestDetailsType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxRequestDetailsType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; requestIndex_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; txHash_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestDetailsType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestDetailsType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder.class); } public static com.google.protobuf.Parser<TxRequestDetailsType> PARSER = new com.google.protobuf.AbstractParser<TxRequestDetailsType>() { public TxRequestDetailsType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxRequestDetailsType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxRequestDetailsType> getParserForType() { return PARSER; } private int bitField0_; public static final int REQUEST_INDEX_FIELD_NUMBER = 1; private int requestIndex_; /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public boolean hasRequestIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public int getRequestIndex() { return requestIndex_; } public static final int TX_HASH_FIELD_NUMBER = 2; private com.google.protobuf.ByteString txHash_; /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public boolean hasTxHash() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public com.google.protobuf.ByteString getTxHash() { return txHash_; } private void initFields() { requestIndex_ = 0; txHash_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, requestIndex_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, txHash_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, requestIndex_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, txHash_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxRequestDetailsType} * * <pre> ** * Structure representing request details * @used_in TxRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxRequestDetailsType) com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestDetailsType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestDetailsType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); requestIndex_ = 0; bitField0_ = (bitField0_ & ~0x00000001); txHash_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestDetailsType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType build() { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType result = new com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.requestIndex_ = requestIndex_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.txHash_ = txHash_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType.getDefaultInstance()) return this; if (other.hasRequestIndex()) { setRequestIndex(other.getRequestIndex()); } if (other.hasTxHash()) { setTxHash(other.getTxHash()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TxRequestDetailsType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int requestIndex_ ; /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public boolean hasRequestIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public int getRequestIndex() { return requestIndex_; } /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public Builder setRequestIndex(int value) { bitField0_ |= 0x00000001; requestIndex_ = value; onChanged(); return this; } /** * <code>optional uint32 request_index = 1;</code> * * <pre> * device expects TxAck message from the computer * </pre> */ public Builder clearRequestIndex() { bitField0_ = (bitField0_ & ~0x00000001); requestIndex_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString txHash_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public boolean hasTxHash() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public com.google.protobuf.ByteString getTxHash() { return txHash_; } /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public Builder setTxHash(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; txHash_ = value; onChanged(); return this; } /** * <code>optional bytes tx_hash = 2;</code> * * <pre> * tx_hash of requested transaction * </pre> */ public Builder clearTxHash() { bitField0_ = (bitField0_ & ~0x00000002); txHash_ = getDefaultInstance().getTxHash(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:TxRequestDetailsType) } static { defaultInstance = new TxRequestDetailsType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxRequestDetailsType) } public interface TxRequestSerializedTypeOrBuilder extends // @@protoc_insertion_point(interface_extends:TxRequestSerializedType) com.google.protobuf.MessageOrBuilder { /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ boolean hasSignatureIndex(); /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ int getSignatureIndex(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ boolean hasSignature(); /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ com.google.protobuf.ByteString getSignature(); /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ boolean hasSerializedTx(); /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ com.google.protobuf.ByteString getSerializedTx(); } /** * Protobuf type {@code TxRequestSerializedType} * * <pre> ** * Structure representing serialized data * @used_in TxRequest * </pre> */ public static final class TxRequestSerializedType extends com.google.protobuf.GeneratedMessage implements // @@protoc_insertion_point(message_implements:TxRequestSerializedType) TxRequestSerializedTypeOrBuilder { // Use TxRequestSerializedType.newBuilder() to construct. private TxRequestSerializedType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private TxRequestSerializedType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final TxRequestSerializedType defaultInstance; public static TxRequestSerializedType getDefaultInstance() { return defaultInstance; } public TxRequestSerializedType getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TxRequestSerializedType( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { bitField0_ |= 0x00000001; signatureIndex_ = input.readUInt32(); break; } case 18: { bitField0_ |= 0x00000002; signature_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; serializedTx_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestSerializedType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestSerializedType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder.class); } public static com.google.protobuf.Parser<TxRequestSerializedType> PARSER = new com.google.protobuf.AbstractParser<TxRequestSerializedType>() { public TxRequestSerializedType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TxRequestSerializedType(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<TxRequestSerializedType> getParserForType() { return PARSER; } private int bitField0_; public static final int SIGNATURE_INDEX_FIELD_NUMBER = 1; private int signatureIndex_; /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public boolean hasSignatureIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public int getSignatureIndex() { return signatureIndex_; } public static final int SIGNATURE_FIELD_NUMBER = 2; private com.google.protobuf.ByteString signature_; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } public static final int SERIALIZED_TX_FIELD_NUMBER = 3; private com.google.protobuf.ByteString serializedTx_; /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public boolean hasSerializedTx() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public com.google.protobuf.ByteString getSerializedTx() { return serializedTx_; } private void initFields() { signatureIndex_ = 0; signature_ = com.google.protobuf.ByteString.EMPTY; serializedTx_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeUInt32(1, signatureIndex_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, signature_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, serializedTx_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, signatureIndex_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, signature_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, serializedTx_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code TxRequestSerializedType} * * <pre> ** * Structure representing serialized data * @used_in TxRequest * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements // @@protoc_insertion_point(builder_implements:TxRequestSerializedType) com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedTypeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestSerializedType_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestSerializedType_fieldAccessorTable .ensureFieldAccessorsInitialized( com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.class, com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.Builder.class); } // Construct using com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); signatureIndex_ = 0; bitField0_ = (bitField0_ & ~0x00000001); signature_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); serializedTx_ = com.google.protobuf.ByteString.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.satoshilabs.trezor.protobuf.TrezorType.internal_static_TxRequestSerializedType_descriptor; } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType getDefaultInstanceForType() { return com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance(); } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType build() { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType buildPartial() { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType result = new com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.signatureIndex_ = signatureIndex_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.signature_ = signature_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.serializedTx_ = serializedTx_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType) { return mergeFrom((com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType other) { if (other == com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType.getDefaultInstance()) return this; if (other.hasSignatureIndex()) { setSignatureIndex(other.getSignatureIndex()); } if (other.hasSignature()) { setSignature(other.getSignature()); } if (other.hasSerializedTx()) { setSerializedTx(other.getSerializedTx()); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.satoshilabs.trezor.protobuf.TrezorType.TxRequestSerializedType) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private int signatureIndex_ ; /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public boolean hasSignatureIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public int getSignatureIndex() { return signatureIndex_; } /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public Builder setSignatureIndex(int value) { bitField0_ |= 0x00000001; signatureIndex_ = value; onChanged(); return this; } /** * <code>optional uint32 signature_index = 1;</code> * * <pre> * 'signature' field contains signed input of this index * </pre> */ public Builder clearSignatureIndex() { bitField0_ = (bitField0_ & ~0x00000001); signatureIndex_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString signature_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public boolean hasSignature() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public com.google.protobuf.ByteString getSignature() { return signature_; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public Builder setSignature(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; signature_ = value; onChanged(); return this; } /** * <code>optional bytes signature = 2;</code> * * <pre> * signature of the signature_index input * </pre> */ public Builder clearSignature() { bitField0_ = (bitField0_ & ~0x00000002); signature_ = getDefaultInstance().getSignature(); onChanged(); return this; } private com.google.protobuf.ByteString serializedTx_ = com.google.protobuf.ByteString.EMPTY; /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public boolean hasSerializedTx() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public com.google.protobuf.ByteString getSerializedTx() { return serializedTx_; } /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public Builder setSerializedTx(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; serializedTx_ = value; onChanged(); return this; } /** * <code>optional bytes serialized_tx = 3;</code> * * <pre> * part of serialized and signed transaction * </pre> */ public Builder clearSerializedTx() { bitField0_ = (bitField0_ & ~0x00000004); serializedTx_ = getDefaultInstance().getSerializedTx(); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:TxRequestSerializedType) } static { defaultInstance = new TxRequestSerializedType(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TxRequestSerializedType) } public static final int WIRE_IN_FIELD_NUMBER = 50002; /** * <code>extend .google.protobuf.EnumValueOptions { ... }</code> * * <pre> * message can be transmitted via wire from PC to TREZOR * </pre> */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.protobuf.DescriptorProtos.EnumValueOptions, java.lang.Boolean> wireIn = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( java.lang.Boolean.class, null); public static final int WIRE_OUT_FIELD_NUMBER = 50003; /** * <code>extend .google.protobuf.EnumValueOptions { ... }</code> * * <pre> * message can be transmitted via wire from TREZOR to PC * </pre> */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.protobuf.DescriptorProtos.EnumValueOptions, java.lang.Boolean> wireOut = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( java.lang.Boolean.class, null); public static final int WIRE_DEBUG_IN_FIELD_NUMBER = 50004; /** * <code>extend .google.protobuf.EnumValueOptions { ... }</code> * * <pre> * message can be transmitted via debug wire from PC to TREZOR * </pre> */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.protobuf.DescriptorProtos.EnumValueOptions, java.lang.Boolean> wireDebugIn = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( java.lang.Boolean.class, null); public static final int WIRE_DEBUG_OUT_FIELD_NUMBER = 50005; /** * <code>extend .google.protobuf.EnumValueOptions { ... }</code> * * <pre> * message can be transmitted via debug wire from TREZOR to PC * </pre> */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< com.google.protobuf.DescriptorProtos.EnumValueOptions, java.lang.Boolean> wireDebugOut = com.google.protobuf.GeneratedMessage .newFileScopedGeneratedExtension( java.lang.Boolean.class, null); private static final com.google.protobuf.Descriptors.Descriptor internal_static_HDNodeType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_HDNodeType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_HDNodePathType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_HDNodePathType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_CoinType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_CoinType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_MultisigRedeemScriptType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_MultisigRedeemScriptType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxInputType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxInputType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxOutputType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxOutputType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxOutputBinType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxOutputBinType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TransactionType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TransactionType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxRequestDetailsType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxRequestDetailsType_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_TxRequestSerializedType_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_TxRequestSerializedType_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\013types.proto\032 google/protobuf/descripto" + "r.proto\"\200\001\n\nHDNodeType\022\r\n\005depth\030\001 \002(\r\022\023\n" + "\013fingerprint\030\002 \002(\r\022\021\n\tchild_num\030\003 \002(\r\022\022\n" + "\nchain_code\030\004 \002(\014\022\023\n\013private_key\030\005 \001(\014\022\022" + "\n\npublic_key\030\006 \001(\014\">\n\016HDNodePathType\022\031\n\004" + "node\030\001 \002(\0132\013.HDNodeType\022\021\n\taddress_n\030\002 \003" + "(\r\"~\n\010CoinType\022\021\n\tcoin_name\030\001 \001(\t\022\025\n\rcoi" + "n_shortcut\030\002 \001(\t\022\027\n\014address_type\030\003 \001(\r:\001" + "0\022\021\n\tmaxfee_kb\030\004 \001(\004\022\034\n\021address_type_p2s" + "h\030\005 \001(\r:\0015\"[\n\030MultisigRedeemScriptType\022 ", "\n\007pubkeys\030\001 \003(\0132\017.HDNodePathType\022\022\n\nsign" + "atures\030\002 \003(\014\022\t\n\001m\030\003 \001(\r\"\333\001\n\013TxInputType\022" + "\021\n\taddress_n\030\001 \003(\r\022\021\n\tprev_hash\030\002 \002(\014\022\022\n" + "\nprev_index\030\003 \002(\r\022\022\n\nscript_sig\030\004 \001(\014\022\034\n" + "\010sequence\030\005 \001(\r:\n4294967295\0223\n\013script_ty" + "pe\030\006 \001(\0162\020.InputScriptType:\014SPENDADDRESS" + "\022+\n\010multisig\030\007 \001(\0132\031.MultisigRedeemScrip" + "tType\"\227\001\n\014TxOutputType\022\017\n\007address\030\001 \001(\t\022" + "\021\n\taddress_n\030\002 \003(\r\022\016\n\006amount\030\003 \002(\004\022&\n\013sc" + "ript_type\030\004 \002(\0162\021.OutputScriptType\022+\n\010mu", "ltisig\030\005 \001(\0132\031.MultisigRedeemScriptType\"" + "8\n\017TxOutputBinType\022\016\n\006amount\030\001 \002(\004\022\025\n\rsc" + "ript_pubkey\030\002 \002(\014\"\303\001\n\017TransactionType\022\017\n" + "\007version\030\001 \001(\r\022\034\n\006inputs\030\002 \003(\0132\014.TxInput" + "Type\022%\n\013bin_outputs\030\003 \003(\0132\020.TxOutputBinT" + "ype\022\036\n\007outputs\030\005 \003(\0132\r.TxOutputType\022\021\n\tl" + "ock_time\030\004 \001(\r\022\022\n\ninputs_cnt\030\006 \001(\r\022\023\n\013ou" + "tputs_cnt\030\007 \001(\r\">\n\024TxRequestDetailsType\022" + "\025\n\rrequest_index\030\001 \001(\r\022\017\n\007tx_hash\030\002 \001(\014\"" + "\\\n\027TxRequestSerializedType\022\027\n\017signature_", "index\030\001 \001(\r\022\021\n\tsignature\030\002 \001(\014\022\025\n\rserial" + "ized_tx\030\003 \001(\014*\315\002\n\013FailureType\022\035\n\031Failure" + "_UnexpectedMessage\020\001\022\032\n\026Failure_ButtonEx" + "pected\020\002\022\027\n\023Failure_SyntaxError\020\003\022\033\n\027Fai" + "lure_ActionCancelled\020\004\022\027\n\023Failure_PinExp" + "ected\020\005\022\030\n\024Failure_PinCancelled\020\006\022\026\n\022Fai" + "lure_PinInvalid\020\007\022\034\n\030Failure_InvalidSign" + "ature\020\010\022\021\n\rFailure_Other\020\t\022\032\n\026Failure_No" + "tEnoughFunds\020\n\022\032\n\026Failure_NotInitialized" + "\020\013\022\031\n\025Failure_FirmwareError\020c*L\n\020OutputS", "criptType\022\020\n\014PAYTOADDRESS\020\000\022\023\n\017PAYTOSCRI" + "PTHASH\020\001\022\021\n\rPAYTOMULTISIG\020\002*6\n\017InputScri" + "ptType\022\020\n\014SPENDADDRESS\020\000\022\021\n\rSPENDMULTISI" + "G\020\001*D\n\013RequestType\022\013\n\007TXINPUT\020\000\022\014\n\010TXOUT" + "PUT\020\001\022\n\n\006TXMETA\020\002\022\016\n\nTXFINISHED\020\003*\302\002\n\021Bu" + "ttonRequestType\022\027\n\023ButtonRequest_Other\020\001" + "\022\"\n\036ButtonRequest_FeeOverThreshold\020\002\022\037\n\033" + "ButtonRequest_ConfirmOutput\020\003\022\035\n\031ButtonR" + "equest_ResetDevice\020\004\022\035\n\031ButtonRequest_Co" + "nfirmWord\020\005\022\034\n\030ButtonRequest_WipeDevice\020", "\006\022\035\n\031ButtonRequest_ProtectCall\020\007\022\030\n\024Butt" + "onRequest_SignTx\020\010\022\037\n\033ButtonRequest_Firm" + "wareCheck\020\t\022\031\n\025ButtonRequest_Address\020\n*\177" + "\n\024PinMatrixRequestType\022 \n\034PinMatrixReque" + "stType_Current\020\001\022!\n\035PinMatrixRequestType" + "_NewFirst\020\002\022\"\n\036PinMatrixRequestType_NewS" + "econd\020\003:4\n\007wire_in\022!.google.protobuf.Enu" + "mValueOptions\030\322\206\003 \001(\010:5\n\010wire_out\022!.goog" + "le.protobuf.EnumValueOptions\030\323\206\003 \001(\010::\n\r" + "wire_debug_in\022!.google.protobuf.EnumValu", "eOptions\030\324\206\003 \001(\010:;\n\016wire_debug_out\022!.goo" + "gle.protobuf.EnumValueOptions\030\325\206\003 \001(\010B-\n" + "\037com.satoshilabs.trezor.protobufB\nTrezor" + "Type" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.DescriptorProtos.getDescriptor(), }, assigner); internal_static_HDNodeType_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_HDNodeType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_HDNodeType_descriptor, new java.lang.String[] { "Depth", "Fingerprint", "ChildNum", "ChainCode", "PrivateKey", "PublicKey", }); internal_static_HDNodePathType_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_HDNodePathType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_HDNodePathType_descriptor, new java.lang.String[] { "Node", "AddressN", }); internal_static_CoinType_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_CoinType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CoinType_descriptor, new java.lang.String[] { "CoinName", "CoinShortcut", "AddressType", "MaxfeeKb", "AddressTypeP2Sh", }); internal_static_MultisigRedeemScriptType_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_MultisigRedeemScriptType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MultisigRedeemScriptType_descriptor, new java.lang.String[] { "Pubkeys", "Signatures", "M", }); internal_static_TxInputType_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_TxInputType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxInputType_descriptor, new java.lang.String[] { "AddressN", "PrevHash", "PrevIndex", "ScriptSig", "Sequence", "ScriptType", "Multisig", }); internal_static_TxOutputType_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_TxOutputType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxOutputType_descriptor, new java.lang.String[] { "Address", "AddressN", "Amount", "ScriptType", "Multisig", }); internal_static_TxOutputBinType_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_TxOutputBinType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxOutputBinType_descriptor, new java.lang.String[] { "Amount", "ScriptPubkey", }); internal_static_TransactionType_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_TransactionType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TransactionType_descriptor, new java.lang.String[] { "Version", "Inputs", "BinOutputs", "Outputs", "LockTime", "InputsCnt", "OutputsCnt", }); internal_static_TxRequestDetailsType_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_TxRequestDetailsType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxRequestDetailsType_descriptor, new java.lang.String[] { "RequestIndex", "TxHash", }); internal_static_TxRequestSerializedType_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_TxRequestSerializedType_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_TxRequestSerializedType_descriptor, new java.lang.String[] { "SignatureIndex", "Signature", "SerializedTx", }); wireIn.internalInit(descriptor.getExtensions().get(0)); wireOut.internalInit(descriptor.getExtensions().get(1)); wireDebugIn.internalInit(descriptor.getExtensions().get(2)); wireDebugOut.internalInit(descriptor.getExtensions().get(3)); com.google.protobuf.DescriptorProtos.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }