org.bitcoin.paymentchannel
Class Protos.UpdatePayment.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.UpdatePayment.Builder>
              extended by org.bitcoin.paymentchannel.Protos.UpdatePayment.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable, Protos.UpdatePaymentOrBuilder
Enclosing class:
Protos.UpdatePayment

public static final class Protos.UpdatePayment.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Protos.UpdatePayment.Builder>
implements Protos.UpdatePaymentOrBuilder

Protobuf type paymentchannels.UpdatePayment

 This message can only be used by the primary after it has received a CHANNEL_OPEN message. It
 creates a new payment transaction. Note that we don't resubmit the entire TX, this is to avoid
 (re)parsing bugs and overhead. The payment transaction is created by the primary by:
 * Adding an input which spends the multisig contract
 * Setting this input's scriptSig to the given signature and a new signature created by the
   primary (the primary should ensure the signature provided correctly spends the multisig
   contract)
 * Adding an output who's scriptPubKey is the same as the refund output (the only output) in
   the refund transaction
 * Setting this output's value to client_change_value (which must be lower than the most recent
   client_change_value and lower than the multisig contract's output value)
 * Adding any number of additional outputs as desired (leaving sufficient fee, if necessary)
 * Adding any number of additional inputs as desired (eg to add more fee)
 


Method Summary
 Protos.UpdatePayment build()
           
 Protos.UpdatePayment buildPartial()
           
 Protos.UpdatePayment.Builder clear()
           
 Protos.UpdatePayment.Builder clearClientChangeValue()
          required uint64 client_change_value = 1;
 Protos.UpdatePayment.Builder clearSignature()
          required bytes signature = 2;
 Protos.UpdatePayment.Builder clone()
           
 long getClientChangeValue()
          required uint64 client_change_value = 1;
 Protos.UpdatePayment getDefaultInstanceForType()
           
static com.google.protobuf.Descriptors.Descriptor getDescriptor()
           
 com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
           
 com.google.protobuf.ByteString getSignature()
          required bytes signature = 2;
 boolean hasClientChangeValue()
          required uint64 client_change_value = 1;
 boolean hasSignature()
          required bytes signature = 2;
protected  com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
           
 boolean isInitialized()
           
 Protos.UpdatePayment.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           
 Protos.UpdatePayment.Builder mergeFrom(com.google.protobuf.Message other)
           
 Protos.UpdatePayment.Builder mergeFrom(Protos.UpdatePayment other)
           
 Protos.UpdatePayment.Builder setClientChangeValue(long value)
          required uint64 client_change_value = 1;
 Protos.UpdatePayment.Builder setSignature(com.google.protobuf.ByteString value)
          required bytes signature = 2;
 
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.UpdatePayment.Builder>

clear

public Protos.UpdatePayment.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.UpdatePayment.Builder>

clone

public Protos.UpdatePayment.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.UpdatePayment.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.UpdatePayment.Builder>

getDefaultInstanceForType

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

build

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

buildPartial

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

mergeFrom

public Protos.UpdatePayment.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.UpdatePayment.Builder>

mergeFrom

public Protos.UpdatePayment.Builder mergeFrom(Protos.UpdatePayment 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.UpdatePayment.Builder>

mergeFrom

public Protos.UpdatePayment.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.UpdatePayment.Builder>
Throws:
IOException

hasClientChangeValue

public boolean hasClientChangeValue()
required uint64 client_change_value = 1;
 The value which is sent back to the primary.  The rest of the multisig output is left for
 the secondary to do with as they wish.
 

Specified by:
hasClientChangeValue in interface Protos.UpdatePaymentOrBuilder

getClientChangeValue

public long getClientChangeValue()
required uint64 client_change_value = 1;
 The value which is sent back to the primary.  The rest of the multisig output is left for
 the secondary to do with as they wish.
 

Specified by:
getClientChangeValue in interface Protos.UpdatePaymentOrBuilder

setClientChangeValue

public Protos.UpdatePayment.Builder setClientChangeValue(long value)
required uint64 client_change_value = 1;
 The value which is sent back to the primary.  The rest of the multisig output is left for
 the secondary to do with as they wish.
 


clearClientChangeValue

public Protos.UpdatePayment.Builder clearClientChangeValue()
required uint64 client_change_value = 1;
 The value which is sent back to the primary.  The rest of the multisig output is left for
 the secondary to do with as they wish.
 


hasSignature

public boolean hasSignature()
required bytes signature = 2;
 A SIGHASH_SINGLE|SIGHASH_ANYONECANPAY signature (including the postfix type byte) which
 spends the primary's part of the multisig contract's output.  This signature only covers
 the primary's refund output and thus the secondary is free to do what they wish with their
 part of the multisig output.
 

Specified by:
hasSignature in interface Protos.UpdatePaymentOrBuilder

getSignature

public com.google.protobuf.ByteString getSignature()
required bytes signature = 2;
 A SIGHASH_SINGLE|SIGHASH_ANYONECANPAY signature (including the postfix type byte) which
 spends the primary's part of the multisig contract's output.  This signature only covers
 the primary's refund output and thus the secondary is free to do what they wish with their
 part of the multisig output.
 

Specified by:
getSignature in interface Protos.UpdatePaymentOrBuilder

setSignature

public Protos.UpdatePayment.Builder setSignature(com.google.protobuf.ByteString value)
required bytes signature = 2;
 A SIGHASH_SINGLE|SIGHASH_ANYONECANPAY signature (including the postfix type byte) which
 spends the primary's part of the multisig contract's output.  This signature only covers
 the primary's refund output and thus the secondary is free to do what they wish with their
 part of the multisig output.
 


clearSignature

public Protos.UpdatePayment.Builder clearSignature()
required bytes signature = 2;
 A SIGHASH_SINGLE|SIGHASH_ANYONECANPAY signature (including the postfix type byte) which
 spends the primary's part of the multisig contract's output.  This signature only covers
 the primary's refund output and thus the secondary is free to do what they wish with their
 part of the multisig output.
 



Copyright © 2014. All rights reserved.