org.bitcoin.paymentchannel
Class Protos.Initiate.Builder

java.lang.Object
  extended by com.google.protobuf.AbstractMessageLite.Builder<BuilderType>
      extended by com.google.protobuf.AbstractMessage.Builder<BuilderType>
          extended by com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>
              extended by org.bitcoin.paymentchannel.Protos.Initiate.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Protos.InitiateOrBuilder
Enclosing class:
Protos.Initiate

public static final class Protos.Initiate.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>
implements Protos.InitiateOrBuilder

Protobuf type paymentchannels.Initiate

 Sent from server to client once version nego is done.
 


Method Summary
 Protos.Initiate build()
           
 Protos.Initiate buildPartial()
           
 Protos.Initiate.Builder clear()
           
 Protos.Initiate.Builder clearExpireTimeSecs()
          required uint64 expire_time_secs = 3;
 Protos.Initiate.Builder clearMinAcceptedChannelSize()
          required uint64 min_accepted_channel_size = 2;
 Protos.Initiate.Builder clearMinPayment()
          required uint64 min_payment = 4;
 Protos.Initiate.Builder clearMultisigKey()
          required bytes multisig_key = 1;
 Protos.Initiate.Builder clone()
           
 Protos.Initiate getDefaultInstanceForType()
           
static com.google.protobuf.Descriptors.Descriptor getDescriptor()
           
 com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
           
 long getExpireTimeSecs()
          required uint64 expire_time_secs = 3;
 long getMinAcceptedChannelSize()
          required uint64 min_accepted_channel_size = 2;
 long getMinPayment()
          required uint64 min_payment = 4;
 com.google.protobuf.ByteString getMultisigKey()
          required bytes multisig_key = 1;
 boolean hasExpireTimeSecs()
          required uint64 expire_time_secs = 3;
 boolean hasMinAcceptedChannelSize()
          required uint64 min_accepted_channel_size = 2;
 boolean hasMinPayment()
          required uint64 min_payment = 4;
 boolean hasMultisigKey()
          required bytes multisig_key = 1;
protected  com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
           
 boolean isInitialized()
           
 Protos.Initiate.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           
 Protos.Initiate.Builder mergeFrom(com.google.protobuf.Message other)
           
 Protos.Initiate.Builder mergeFrom(Protos.Initiate other)
           
 Protos.Initiate.Builder setExpireTimeSecs(long value)
          required uint64 expire_time_secs = 3;
 Protos.Initiate.Builder setMinAcceptedChannelSize(long value)
          required uint64 min_accepted_channel_size = 2;
 Protos.Initiate.Builder setMinPayment(long value)
          required uint64 min_payment = 4;
 Protos.Initiate.Builder setMultisigKey(com.google.protobuf.ByteString value)
          required bytes multisig_key = 1;
 
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, getAllFields, getField, getFieldBuilder, getParentForChildren, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, isClean, markClean, mergeUnknownFields, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields
 
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
 
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, newUninitializedMessageException
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField
 

Method Detail

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.Builder<Protos.Initiate.Builder>

clear

public Protos.Initiate.Builder clear()
Specified by:
clear in interface com.google.protobuf.Message.Builder
Specified by:
clear in interface com.google.protobuf.MessageLite.Builder
Overrides:
clear in class com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>

clone

public Protos.Initiate.Builder clone()
Specified by:
clone in interface com.google.protobuf.Message.Builder
Specified by:
clone in interface com.google.protobuf.MessageLite.Builder
Overrides:
clone in class com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>

getDescriptorForType

public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Specified by:
getDescriptorForType in interface com.google.protobuf.Message.Builder
Specified by:
getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
Overrides:
getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>

getDefaultInstanceForType

public Protos.Initiate getDefaultInstanceForType()
Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
Specified by:
getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder

build

public Protos.Initiate build()
Specified by:
build in interface com.google.protobuf.Message.Builder
Specified by:
build in interface com.google.protobuf.MessageLite.Builder

buildPartial

public Protos.Initiate buildPartial()
Specified by:
buildPartial in interface com.google.protobuf.Message.Builder
Specified by:
buildPartial in interface com.google.protobuf.MessageLite.Builder

mergeFrom

public Protos.Initiate.Builder mergeFrom(com.google.protobuf.Message other)
Specified by:
mergeFrom in interface com.google.protobuf.Message.Builder
Overrides:
mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Protos.Initiate.Builder>

mergeFrom

public Protos.Initiate.Builder mergeFrom(Protos.Initiate other)

isInitialized

public final boolean isInitialized()
Specified by:
isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
Overrides:
isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Protos.Initiate.Builder>

mergeFrom

public Protos.Initiate.Builder mergeFrom(com.google.protobuf.CodedInputStream input,
                                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                  throws IOException
Specified by:
mergeFrom in interface com.google.protobuf.Message.Builder
Specified by:
mergeFrom in interface com.google.protobuf.MessageLite.Builder
Overrides:
mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Protos.Initiate.Builder>
Throws:
IOException

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

setMultisigKey

public Protos.Initiate.Builder setMultisigKey(com.google.protobuf.ByteString value)
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
 


clearMultisigKey

public Protos.Initiate.Builder clearMultisigKey()
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
 


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

setMinAcceptedChannelSize

public Protos.Initiate.Builder setMinAcceptedChannelSize(long value)
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.
 


clearMinAcceptedChannelSize

public Protos.Initiate.Builder clearMinAcceptedChannelSize()
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.
 


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

setExpireTimeSecs

public Protos.Initiate.Builder setExpireTimeSecs(long value)
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.
 


clearExpireTimeSecs

public Protos.Initiate.Builder clearExpireTimeSecs()
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.
 


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

setMinPayment

public Protos.Initiate.Builder setMinPayment(long value)
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.
 


clearMinPayment

public Protos.Initiate.Builder clearMinPayment()
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.
 



Copyright © 2014. All rights reserved.