org.bitcoin.paymentchannel
Class Protos.Initiate
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.bitcoin.paymentchannel.Protos.Initiate
- All Implemented Interfaces:
- com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, Protos.InitiateOrBuilder
- Enclosing class:
- Protos
public static final class Protos.Initiate
- extends com.google.protobuf.GeneratedMessage
- implements Protos.InitiateOrBuilder
Protobuf type paymentchannels.Initiate
Sent from server to client once version nego is done.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage |
com.google.protobuf.GeneratedMessage.BuilderParent, com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessage.ExtendableBuilder>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingType extends com.google.protobuf.Message,Type> |
| Fields inherited from class com.google.protobuf.GeneratedMessage |
alwaysUseFieldBuilders |
| Methods inherited from class com.google.protobuf.GeneratedMessage |
getAllFields, getDescriptorForType, getField, getRepeatedField, getRepeatedFieldCount, hasField, makeExtensionsImmutable, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownField |
| Methods inherited from class com.google.protobuf.AbstractMessage |
equals, findInitializationErrors, getInitializationErrorString, hashBoolean, hashCode, hashEnum, hashEnumList, hashFields, hashLong, toString |
| Methods inherited from class com.google.protobuf.AbstractMessageLite |
toByteArray, toByteString, writeDelimitedTo, writeTo |
| Methods inherited from interface com.google.protobuf.MessageOrBuilder |
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, hasField |
| Methods inherited from interface com.google.protobuf.MessageLite |
toByteArray, toByteString, writeDelimitedTo, writeTo |
PARSER
public static com.google.protobuf.Parser<Protos.Initiate> PARSER
MULTISIG_KEY_FIELD_NUMBER
public static final int MULTISIG_KEY_FIELD_NUMBER
- See Also:
- Constant Field Values
MIN_ACCEPTED_CHANNEL_SIZE_FIELD_NUMBER
public static final int MIN_ACCEPTED_CHANNEL_SIZE_FIELD_NUMBER
- See Also:
- Constant Field Values
EXPIRE_TIME_SECS_FIELD_NUMBER
public static final int EXPIRE_TIME_SECS_FIELD_NUMBER
- See Also:
- Constant Field Values
MIN_PAYMENT_FIELD_NUMBER
public static final int MIN_PAYMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
getDefaultInstance
public static Protos.Initiate getDefaultInstance()
getDefaultInstanceForType
public Protos.Initiate getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields in interface com.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFields in class com.google.protobuf.GeneratedMessage
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
getParserForType
public com.google.protobuf.Parser<Protos.Initiate> getParserForType()
- Specified by:
getParserForType in interface com.google.protobuf.Message- Specified by:
getParserForType in interface com.google.protobuf.MessageLite- Overrides:
getParserForType in class com.google.protobuf.GeneratedMessage
hasMultisigKey
public boolean hasMultisigKey()
required bytes multisig_key = 1;
This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
are accepted. It is used only in the creation of the multisig contract, as outputs are
created entirely by the secondary
- Specified by:
hasMultisigKey in interface Protos.InitiateOrBuilder
getMultisigKey
public com.google.protobuf.ByteString getMultisigKey()
required bytes multisig_key = 1;
This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
are accepted. It is used only in the creation of the multisig contract, as outputs are
created entirely by the secondary
- Specified by:
getMultisigKey in interface Protos.InitiateOrBuilder
hasMinAcceptedChannelSize
public boolean hasMinAcceptedChannelSize()
required uint64 min_accepted_channel_size = 2;
Once a channel is exhausted a new one must be set up. So secondary indicates the minimum
size it's willing to accept here. This can be lower to trade off resources against
security but shouldn't be so low the transactions get rejected by the network as spam.
Zero isn't a sensible value to have here, so we make the field required.
- Specified by:
hasMinAcceptedChannelSize in interface Protos.InitiateOrBuilder
getMinAcceptedChannelSize
public long getMinAcceptedChannelSize()
required uint64 min_accepted_channel_size = 2;
Once a channel is exhausted a new one must be set up. So secondary indicates the minimum
size it's willing to accept here. This can be lower to trade off resources against
security but shouldn't be so low the transactions get rejected by the network as spam.
Zero isn't a sensible value to have here, so we make the field required.
- Specified by:
getMinAcceptedChannelSize in interface Protos.InitiateOrBuilder
hasExpireTimeSecs
public boolean hasExpireTimeSecs()
required uint64 expire_time_secs = 3;
Rough UNIX time for when the channel expires. This is determined by the block header
timestamps which can be very inaccurate when miners use the obsolete RollNTime hack.
Channels could also be specified in terms of block heights but then how do you know the
current chain height if you don't have internet access? Trust the server? Probably opens up
attack vectors. We can assume the client has an independent clock, however. If the client
considers this value too far off (eg more than a day), it may send an ERROR and close the
channel.
- Specified by:
hasExpireTimeSecs in interface Protos.InitiateOrBuilder
getExpireTimeSecs
public long getExpireTimeSecs()
required uint64 expire_time_secs = 3;
Rough UNIX time for when the channel expires. This is determined by the block header
timestamps which can be very inaccurate when miners use the obsolete RollNTime hack.
Channels could also be specified in terms of block heights but then how do you know the
current chain height if you don't have internet access? Trust the server? Probably opens up
attack vectors. We can assume the client has an independent clock, however. If the client
considers this value too far off (eg more than a day), it may send an ERROR and close the
channel.
- Specified by:
getExpireTimeSecs in interface Protos.InitiateOrBuilder
hasMinPayment
public boolean hasMinPayment()
required uint64 min_payment = 4;
The amount of money the server requires for the initial payment. The act of opening a channel
always transfers some quantity of money to the server: it's impossible to have a channel with
zero value transferred. This rule ensures that you can't get a channel that can't be settled
due to having paid under the dust limit. Because the dust limit will float in future, the
server tells the client what it thinks it is, and the client is supposed to sanity check this
value.
- Specified by:
hasMinPayment in interface Protos.InitiateOrBuilder
getMinPayment
public long getMinPayment()
required uint64 min_payment = 4;
The amount of money the server requires for the initial payment. The act of opening a channel
always transfers some quantity of money to the server: it's impossible to have a channel with
zero value transferred. This rule ensures that you can't get a channel that can't be settled
due to having paid under the dust limit. Because the dust limit will float in future, the
server tells the client what it thinks it is, and the client is supposed to sanity check this
value.
- Specified by:
getMinPayment in interface Protos.InitiateOrBuilder
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized in interface com.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitialized in class com.google.protobuf.GeneratedMessage
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
- Specified by:
writeTo in interface com.google.protobuf.MessageLite- Overrides:
writeTo in class com.google.protobuf.AbstractMessage
- Throws:
IOException
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize in interface com.google.protobuf.MessageLite- Overrides:
getSerializedSize in class com.google.protobuf.AbstractMessage
writeReplace
protected Object writeReplace()
throws ObjectStreamException
- Overrides:
writeReplace in class com.google.protobuf.GeneratedMessage
- Throws:
ObjectStreamException
parseFrom
public static Protos.Initiate parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static Protos.Initiate parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static Protos.Initiate parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static Protos.Initiate parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
parseFrom
public static Protos.Initiate parseFrom(InputStream input)
throws IOException
- Throws:
IOException
parseFrom
public static Protos.Initiate parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
parseDelimitedFrom
public static Protos.Initiate parseDelimitedFrom(InputStream input)
throws IOException
- Throws:
IOException
parseDelimitedFrom
public static Protos.Initiate parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
parseFrom
public static Protos.Initiate parseFrom(com.google.protobuf.CodedInputStream input)
throws IOException
- Throws:
IOException
parseFrom
public static Protos.Initiate parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws IOException
- Throws:
IOException
newBuilder
public static Protos.Initiate.Builder newBuilder()
newBuilderForType
public Protos.Initiate.Builder newBuilderForType()
- Specified by:
newBuilderForType in interface com.google.protobuf.Message- Specified by:
newBuilderForType in interface com.google.protobuf.MessageLite
newBuilder
public static Protos.Initiate.Builder newBuilder(Protos.Initiate prototype)
toBuilder
public Protos.Initiate.Builder toBuilder()
- Specified by:
toBuilder in interface com.google.protobuf.Message- Specified by:
toBuilder in interface com.google.protobuf.MessageLite
newBuilderForType
protected Protos.Initiate.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
- Specified by:
newBuilderForType in class com.google.protobuf.GeneratedMessage
Copyright © 2014. All rights reserved.