Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: paymentchannel.proto
package org.bitcoin.paymentchannel;
public final class Protos {
private Protos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public interface TwoWayChannelMessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.TwoWayChannelMessage)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return Whether the type field is set.
*/
boolean hasType();
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return The type.
*/
org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType getType();
/**
*
* Now one optional field for each message. Only the field specified by type should be read.
*
*
* optional .paymentchannels.ClientVersion client_version = 2;
* @return Whether the clientVersion field is set.
*/
boolean hasClientVersion();
/**
*
* Now one optional field for each message. Only the field specified by type should be read.
*
*
* optional .paymentchannels.ClientVersion client_version = 2;
* @return The clientVersion.
*/
org.bitcoin.paymentchannel.Protos.ClientVersion getClientVersion();
/**
* optional .paymentchannels.ServerVersion server_version = 3;
* @return Whether the serverVersion field is set.
*/
boolean hasServerVersion();
/**
* optional .paymentchannels.ServerVersion server_version = 3;
* @return The serverVersion.
*/
org.bitcoin.paymentchannel.Protos.ServerVersion getServerVersion();
/**
* optional .paymentchannels.Initiate initiate = 4;
* @return Whether the initiate field is set.
*/
boolean hasInitiate();
/**
* optional .paymentchannels.Initiate initiate = 4;
* @return The initiate.
*/
org.bitcoin.paymentchannel.Protos.Initiate getInitiate();
/**
* optional .paymentchannels.ProvideRefund provide_refund = 5;
* @return Whether the provideRefund field is set.
*/
boolean hasProvideRefund();
/**
* optional .paymentchannels.ProvideRefund provide_refund = 5;
* @return The provideRefund.
*/
org.bitcoin.paymentchannel.Protos.ProvideRefund getProvideRefund();
/**
* optional .paymentchannels.ReturnRefund return_refund = 6;
* @return Whether the returnRefund field is set.
*/
boolean hasReturnRefund();
/**
* optional .paymentchannels.ReturnRefund return_refund = 6;
* @return The returnRefund.
*/
org.bitcoin.paymentchannel.Protos.ReturnRefund getReturnRefund();
/**
* optional .paymentchannels.ProvideContract provide_contract = 7;
* @return Whether the provideContract field is set.
*/
boolean hasProvideContract();
/**
* optional .paymentchannels.ProvideContract provide_contract = 7;
* @return The provideContract.
*/
org.bitcoin.paymentchannel.Protos.ProvideContract getProvideContract();
/**
* optional .paymentchannels.UpdatePayment update_payment = 8;
* @return Whether the updatePayment field is set.
*/
boolean hasUpdatePayment();
/**
* optional .paymentchannels.UpdatePayment update_payment = 8;
* @return The updatePayment.
*/
org.bitcoin.paymentchannel.Protos.UpdatePayment getUpdatePayment();
/**
* optional .paymentchannels.PaymentAck payment_ack = 11;
* @return Whether the paymentAck field is set.
*/
boolean hasPaymentAck();
/**
* optional .paymentchannels.PaymentAck payment_ack = 11;
* @return The paymentAck.
*/
org.bitcoin.paymentchannel.Protos.PaymentAck getPaymentAck();
/**
* optional .paymentchannels.Settlement settlement = 9;
* @return Whether the settlement field is set.
*/
boolean hasSettlement();
/**
* optional .paymentchannels.Settlement settlement = 9;
* @return The settlement.
*/
org.bitcoin.paymentchannel.Protos.Settlement getSettlement();
/**
* optional .paymentchannels.Error error = 10;
* @return Whether the error field is set.
*/
boolean hasError();
/**
* optional .paymentchannels.Error error = 10;
* @return The error.
*/
org.bitcoin.paymentchannel.Protos.Error getError();
}
/**
*
* This message is designed to be either sent raw over the network (e.g. length prefixed) or embedded inside another
* protocol that is being extended to support micropayments. In this file "primary" typically can be read as "client"
* and "secondary" as "server".
*
* Note that there are no optional fields set for CHANNEL_OPEN, it is sent from the
* secondary to the primary to indicate that the provided contract was received,
* verified, and broadcast successfully and the primary can now provide UPDATE messages
* at will to begin paying secondary. If the channel is interrupted after the
* CHANNEL_OPEN message (ie closed without an explicit CLOSE or ERROR) the primary may
* reopen the channel by setting the contract transaction hash in its CLIENT_VERSION
* message.
*
* Sent by the server to the client after an UPDATE_PAYMENT message is successfully processed.
*
*
* PAYMENT_ACK = 11;
*/
PAYMENT_ACK(11),
/**
*
* Either side can send this message. If the client sends it to the server, then the server
* takes the most recent signature it received in an UPDATE_PAYMENT and uses it to create a
* valid transaction, which it then broadcasts on the network.
* Once broadcast is complete, it sends back another CLOSE message with the settlement field set, containing
* the final state of the contract.
* The server is allowed to initiate settlement whenever it wants, in which case the client will
* asynchronously receive a CLOSE message with the settlement field set. The server is also allowed
* to send a CLOSE to mark the end of a connection without any settlement taking place, in which
* case this is just an equivalent to a TCP FIN packet. An explicit end-of-protocol markers can be
* useful when this protocol is embedded inside another.
*
*
* CLOSE = 9;
*/
CLOSE(9),
/**
*
* Used to indicate an error condition.
* Both parties should make an effort to send either an ERROR or a CLOSE immediately
* before closing the socket (unless they just received an ERROR or a CLOSE). This is important
* because the protocol may not run over TCP.
*
*
* ERROR = 10;
*/
ERROR(10),
;
/**
* CLIENT_VERSION = 1;
*/
public static final int CLIENT_VERSION_VALUE = 1;
/**
* SERVER_VERSION = 2;
*/
public static final int SERVER_VERSION_VALUE = 2;
/**
* INITIATE = 3;
*/
public static final int INITIATE_VALUE = 3;
/**
* PROVIDE_REFUND = 4;
*/
public static final int PROVIDE_REFUND_VALUE = 4;
/**
* RETURN_REFUND = 5;
*/
public static final int RETURN_REFUND_VALUE = 5;
/**
* PROVIDE_CONTRACT = 6;
*/
public static final int PROVIDE_CONTRACT_VALUE = 6;
/**
*
* Note that there are no optional fields set for CHANNEL_OPEN, it is sent from the
* secondary to the primary to indicate that the provided contract was received,
* verified, and broadcast successfully and the primary can now provide UPDATE messages
* at will to begin paying secondary. If the channel is interrupted after the
* CHANNEL_OPEN message (ie closed without an explicit CLOSE or ERROR) the primary may
* reopen the channel by setting the contract transaction hash in its CLIENT_VERSION
* message.
*
*
* CHANNEL_OPEN = 7;
*/
public static final int CHANNEL_OPEN_VALUE = 7;
/**
* UPDATE_PAYMENT = 8;
*/
public static final int UPDATE_PAYMENT_VALUE = 8;
/**
*
* Sent by the server to the client after an UPDATE_PAYMENT message is successfully processed.
*
*
* PAYMENT_ACK = 11;
*/
public static final int PAYMENT_ACK_VALUE = 11;
/**
*
* Either side can send this message. If the client sends it to the server, then the server
* takes the most recent signature it received in an UPDATE_PAYMENT and uses it to create a
* valid transaction, which it then broadcasts on the network.
* Once broadcast is complete, it sends back another CLOSE message with the settlement field set, containing
* the final state of the contract.
* The server is allowed to initiate settlement whenever it wants, in which case the client will
* asynchronously receive a CLOSE message with the settlement field set. The server is also allowed
* to send a CLOSE to mark the end of a connection without any settlement taking place, in which
* case this is just an equivalent to a TCP FIN packet. An explicit end-of-protocol markers can be
* useful when this protocol is embedded inside another.
*
*
* CLOSE = 9;
*/
public static final int CLOSE_VALUE = 9;
/**
*
* Used to indicate an error condition.
* Both parties should make an effort to send either an ERROR or a CLOSE immediately
* before closing the socket (unless they just received an ERROR or a CLOSE). This is important
* because the protocol may not run over TCP.
*
*
* ERROR = 10;
*/
public static final int ERROR_VALUE = 10;
@java.lang.Override
public final int getNumber() {
return value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MessageType valueOf(int value) {
return forNumber(value);
}
public static MessageType forNumber(int value) {
switch (value) {
case 1: return CLIENT_VERSION;
case 2: return SERVER_VERSION;
case 3: return INITIATE;
case 4: return PROVIDE_REFUND;
case 5: return RETURN_REFUND;
case 6: return PROVIDE_CONTRACT;
case 7: return CHANNEL_OPEN;
case 8: return UPDATE_PAYMENT;
case 11: return PAYMENT_ACK;
case 9: return CLOSE;
case 10: return ERROR;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MessageType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
@java.lang.Override
public MessageType findValueByNumber(int number) {
return MessageType.forNumber(number);
}
};
public static com.google.protobuf.Internal.EnumVerifier
internalGetVerifier() {
return MessageTypeVerifier.INSTANCE;
}
private static final class MessageTypeVerifier implements
com.google.protobuf.Internal.EnumVerifier {
static final com.google.protobuf.Internal.EnumVerifier INSTANCE = new MessageTypeVerifier();
@java.lang.Override
public boolean isInRange(int number) {
return MessageType.forNumber(number) != null;
}
};
private final int value;
private MessageType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:paymentchannels.TwoWayChannelMessage.MessageType)
}
private int bitField0_;
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return The type.
*/
@java.lang.Override
public org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType getType() {
org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType result = org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType.forNumber(type_);
return result == null ? org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType.CLIENT_VERSION : result;
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @param value The type to set.
*/
private void setType(org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType value) {
type_ = value.getNumber();
bitField0_ |= 0x00000001;
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
*/
private void clearType() {
bitField0_ = (bitField0_ & ~0x00000001);
type_ = 1;
}
public static final int CLIENT_VERSION_FIELD_NUMBER = 2;
private org.bitcoin.paymentchannel.Protos.ClientVersion clientVersion_;
/**
*
* Now one optional field for each message. Only the field specified by type should be read.
*
* This message is designed to be either sent raw over the network (e.g. length prefixed) or embedded inside another
* protocol that is being extended to support micropayments. In this file "primary" typically can be read as "client"
* and "secondary" as "server".
*
*
* Protobuf type {@code paymentchannels.TwoWayChannelMessage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.TwoWayChannelMessage)
org.bitcoin.paymentchannel.Protos.TwoWayChannelMessageOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return instance.hasType();
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return The type.
*/
@java.lang.Override
public org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType getType() {
return instance.getType();
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setType(org.bitcoin.paymentchannel.Protos.TwoWayChannelMessage.MessageType value) {
copyOnWrite();
instance.setType(value);
return this;
}
/**
*
* This is required so if a new message type is added in future, old software aborts trying
* to read the message as early as possible. If the message doesn't parse, the socket should
* be closed.
*
*
* required .paymentchannels.TwoWayChannelMessage.MessageType type = 1;
* @return This builder for chaining.
*/
public Builder clearType() {
copyOnWrite();
instance.clearType();
return this;
}
/**
*
* Now one optional field for each message. Only the field specified by type should be read.
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @return Whether the previousChannelContractHash field is set.
*/
boolean hasPreviousChannelContractHash();
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return Whether the timeWindowSecs field is set.
*/
boolean hasTimeWindowSecs();
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return The timeWindowSecs.
*/
long getTimeWindowSecs();
}
/**
*
* Sent by primary to secondary on opening the connection. If anything is received before this is
* sent, the socket is closed.
*
*
* Protobuf type {@code paymentchannels.ClientVersion}
*/
public static final class ClientVersion extends
com.google.protobuf.GeneratedMessageLite<
ClientVersion, ClientVersion.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.ClientVersion)
ClientVersionOrBuilder {
private ClientVersion() {
previousChannelContractHash_ = com.google.protobuf.ByteString.EMPTY;
timeWindowSecs_ = 86340L;
}
private int bitField0_;
public static final int MAJOR_FIELD_NUMBER = 1;
private int major_;
/**
* required int32 major = 1;
* @return Whether the major field is set.
*/
@java.lang.Override
public boolean hasMajor() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required int32 major = 1;
* @return The major.
*/
@java.lang.Override
public int getMajor() {
return major_;
}
/**
* required int32 major = 1;
* @param value The major to set.
*/
private void setMajor(int value) {
bitField0_ |= 0x00000001;
major_ = value;
}
/**
* required int32 major = 1;
*/
private void clearMajor() {
bitField0_ = (bitField0_ & ~0x00000001);
major_ = 0;
}
public static final int MINOR_FIELD_NUMBER = 2;
private int minor_;
/**
* optional int32 minor = 2 [default = 0];
* @return Whether the minor field is set.
*/
@java.lang.Override
public boolean hasMinor() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional int32 minor = 2 [default = 0];
* @return The minor.
*/
@java.lang.Override
public int getMinor() {
return minor_;
}
/**
* optional int32 minor = 2 [default = 0];
* @param value The minor to set.
*/
private void setMinor(int value) {
bitField0_ |= 0x00000002;
minor_ = value;
}
/**
* optional int32 minor = 2 [default = 0];
*/
private void clearMinor() {
bitField0_ = (bitField0_ & ~0x00000002);
minor_ = 0;
}
public static final int PREVIOUS_CHANNEL_CONTRACT_HASH_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString previousChannelContractHash_;
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @return Whether the previousChannelContractHash field is set.
*/
@java.lang.Override
public boolean hasPreviousChannelContractHash() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @param value The previousChannelContractHash to set.
*/
private void setPreviousChannelContractHash(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000004;
previousChannelContractHash_ = value;
}
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
*/
private void clearPreviousChannelContractHash() {
bitField0_ = (bitField0_ & ~0x00000004);
previousChannelContractHash_ = getDefaultInstance().getPreviousChannelContractHash();
}
public static final int TIME_WINDOW_SECS_FIELD_NUMBER = 4;
private long timeWindowSecs_;
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return Whether the timeWindowSecs field is set.
*/
@java.lang.Override
public boolean hasTimeWindowSecs() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return The timeWindowSecs.
*/
@java.lang.Override
public long getTimeWindowSecs() {
return timeWindowSecs_;
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
* Sent by primary to secondary on opening the connection. If anything is received before this is
* sent, the socket is closed.
*
*
* Protobuf type {@code paymentchannels.ClientVersion}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.ClientVersion, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.ClientVersion)
org.bitcoin.paymentchannel.Protos.ClientVersionOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.ClientVersion.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* required int32 major = 1;
* @return Whether the major field is set.
*/
@java.lang.Override
public boolean hasMajor() {
return instance.hasMajor();
}
/**
* required int32 major = 1;
* @return The major.
*/
@java.lang.Override
public int getMajor() {
return instance.getMajor();
}
/**
* required int32 major = 1;
* @param value The major to set.
* @return This builder for chaining.
*/
public Builder setMajor(int value) {
copyOnWrite();
instance.setMajor(value);
return this;
}
/**
* required int32 major = 1;
* @return This builder for chaining.
*/
public Builder clearMajor() {
copyOnWrite();
instance.clearMajor();
return this;
}
/**
* optional int32 minor = 2 [default = 0];
* @return Whether the minor field is set.
*/
@java.lang.Override
public boolean hasMinor() {
return instance.hasMinor();
}
/**
* optional int32 minor = 2 [default = 0];
* @return The minor.
*/
@java.lang.Override
public int getMinor() {
return instance.getMinor();
}
/**
* optional int32 minor = 2 [default = 0];
* @param value The minor to set.
* @return This builder for chaining.
*/
public Builder setMinor(int value) {
copyOnWrite();
instance.setMinor(value);
return this;
}
/**
* optional int32 minor = 2 [default = 0];
* @return This builder for chaining.
*/
public Builder clearMinor() {
copyOnWrite();
instance.clearMinor();
return this;
}
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @return Whether the previousChannelContractHash field is set.
*/
@java.lang.Override
public boolean hasPreviousChannelContractHash() {
return instance.hasPreviousChannelContractHash();
}
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @param value The previousChannelContractHash to set.
* @return This builder for chaining.
*/
public Builder setPreviousChannelContractHash(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setPreviousChannelContractHash(value);
return this;
}
/**
*
* The hash of the multisig contract of a previous channel. This indicates that the primary
* wishes to reopen the given channel. If the server is willing to reopen it, it simply
* responds with a SERVER_VERSION and then immediately sends a CHANNEL_OPEN, it otherwise
* follows SERVER_VERSION with an Initiate representing a new channel
*
*
* optional bytes previous_channel_contract_hash = 3;
* @return This builder for chaining.
*/
public Builder clearPreviousChannelContractHash() {
copyOnWrite();
instance.clearPreviousChannelContractHash();
return this;
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return Whether the timeWindowSecs field is set.
*/
@java.lang.Override
public boolean hasTimeWindowSecs() {
return instance.hasTimeWindowSecs();
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return The timeWindowSecs.
*/
@java.lang.Override
public long getTimeWindowSecs() {
return instance.getTimeWindowSecs();
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @param value The timeWindowSecs to set.
* @return This builder for chaining.
*/
public Builder setTimeWindowSecs(long value) {
copyOnWrite();
instance.setTimeWindowSecs(value);
return this;
}
/**
*
* How many seconds should the channel be open, only used when a new channel is created.
* Defaults to 24 h minus 60 seconds, 24*60*60 - 60
*
*
* optional uint64 time_window_secs = 4 [default = 86340];
* @return This builder for chaining.
*/
public Builder clearTimeWindowSecs() {
copyOnWrite();
instance.clearTimeWindowSecs();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.ClientVersion)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.ClientVersion();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"major_",
"minor_",
"previousChannelContractHash_",
"timeWindowSecs_",
};
java.lang.String info =
"\u0001\u0004\u0000\u0001\u0001\u0004\u0004\u0000\u0000\u0001\u0001\u1504\u0000\u0002" +
"\u1004\u0001\u0003\u100a\u0002\u0004\u1003\u0003";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.ClientVersion.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.ClientVersion)
private static final org.bitcoin.paymentchannel.Protos.ClientVersion DEFAULT_INSTANCE;
static {
ClientVersion defaultInstance = new ClientVersion();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ClientVersion.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.ClientVersion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ServerVersionOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.ServerVersion)
com.google.protobuf.MessageLiteOrBuilder {
/**
* required int32 major = 1;
* @return Whether the major field is set.
*/
boolean hasMajor();
/**
* required int32 major = 1;
* @return The major.
*/
int getMajor();
/**
* optional int32 minor = 2 [default = 0];
* @return Whether the minor field is set.
*/
boolean hasMinor();
/**
* optional int32 minor = 2 [default = 0];
* @return The minor.
*/
int getMinor();
}
/**
*
* Send by secondary to primary upon receiving the ClientVersion message. If it is willing to
* speak the given major version, it sends back the same major version and the minor version it
* speaks. If it is not, it may send back a lower major version representing the highest version
* it is willing to speak, or sends a NO_ACCEPTABLE_VERSION Error. If the secondary sends back a
* lower major version, the secondary should either expect to continue with that version, or
* should immediately close the connection with a NO_ACCEPTABLE_VERSION Error. Backwards
* incompatible changes to the protocol bump the major version. Extensions bump the minor version
*
*
* Protobuf type {@code paymentchannels.ServerVersion}
*/
public static final class ServerVersion extends
com.google.protobuf.GeneratedMessageLite<
ServerVersion, ServerVersion.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.ServerVersion)
ServerVersionOrBuilder {
private ServerVersion() {
}
private int bitField0_;
public static final int MAJOR_FIELD_NUMBER = 1;
private int major_;
/**
* required int32 major = 1;
* @return Whether the major field is set.
*/
@java.lang.Override
public boolean hasMajor() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* required int32 major = 1;
* @return The major.
*/
@java.lang.Override
public int getMajor() {
return major_;
}
/**
* required int32 major = 1;
* @param value The major to set.
*/
private void setMajor(int value) {
bitField0_ |= 0x00000001;
major_ = value;
}
/**
* required int32 major = 1;
*/
private void clearMajor() {
bitField0_ = (bitField0_ & ~0x00000001);
major_ = 0;
}
public static final int MINOR_FIELD_NUMBER = 2;
private int minor_;
/**
* optional int32 minor = 2 [default = 0];
* @return Whether the minor field is set.
*/
@java.lang.Override
public boolean hasMinor() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional int32 minor = 2 [default = 0];
* @return The minor.
*/
@java.lang.Override
public int getMinor() {
return minor_;
}
/**
* optional int32 minor = 2 [default = 0];
* @param value The minor to set.
*/
private void setMinor(int value) {
bitField0_ |= 0x00000002;
minor_ = value;
}
/**
* optional int32 minor = 2 [default = 0];
*/
private void clearMinor() {
bitField0_ = (bitField0_ & ~0x00000002);
minor_ = 0;
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, data, extensionRegistry);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageLite.parseFrom(
DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(org.bitcoin.paymentchannel.Protos.ServerVersion prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
/**
*
* Send by secondary to primary upon receiving the ClientVersion message. If it is willing to
* speak the given major version, it sends back the same major version and the minor version it
* speaks. If it is not, it may send back a lower major version representing the highest version
* it is willing to speak, or sends a NO_ACCEPTABLE_VERSION Error. If the secondary sends back a
* lower major version, the secondary should either expect to continue with that version, or
* should immediately close the connection with a NO_ACCEPTABLE_VERSION Error. Backwards
* incompatible changes to the protocol bump the major version. Extensions bump the minor version
*
*
* Protobuf type {@code paymentchannels.ServerVersion}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.ServerVersion, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.ServerVersion)
org.bitcoin.paymentchannel.Protos.ServerVersionOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.ServerVersion.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* required int32 major = 1;
* @return Whether the major field is set.
*/
@java.lang.Override
public boolean hasMajor() {
return instance.hasMajor();
}
/**
* required int32 major = 1;
* @return The major.
*/
@java.lang.Override
public int getMajor() {
return instance.getMajor();
}
/**
* required int32 major = 1;
* @param value The major to set.
* @return This builder for chaining.
*/
public Builder setMajor(int value) {
copyOnWrite();
instance.setMajor(value);
return this;
}
/**
* required int32 major = 1;
* @return This builder for chaining.
*/
public Builder clearMajor() {
copyOnWrite();
instance.clearMajor();
return this;
}
/**
* optional int32 minor = 2 [default = 0];
* @return Whether the minor field is set.
*/
@java.lang.Override
public boolean hasMinor() {
return instance.hasMinor();
}
/**
* optional int32 minor = 2 [default = 0];
* @return The minor.
*/
@java.lang.Override
public int getMinor() {
return instance.getMinor();
}
/**
* optional int32 minor = 2 [default = 0];
* @param value The minor to set.
* @return This builder for chaining.
*/
public Builder setMinor(int value) {
copyOnWrite();
instance.setMinor(value);
return this;
}
/**
* optional int32 minor = 2 [default = 0];
* @return This builder for chaining.
*/
public Builder clearMinor() {
copyOnWrite();
instance.clearMinor();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.ServerVersion)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.ServerVersion();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"major_",
"minor_",
};
java.lang.String info =
"\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0001\u0001\u1504\u0000\u0002" +
"\u1004\u0001";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.ServerVersion.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.ServerVersion)
private static final org.bitcoin.paymentchannel.Protos.ServerVersion DEFAULT_INSTANCE;
static {
ServerVersion defaultInstance = new ServerVersion();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ServerVersion.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.ServerVersion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface InitiateOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.Initiate)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* 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
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
boolean hasMultisigKey();
/**
*
* 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
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return Whether the minAcceptedChannelSize field is set.
*/
boolean hasMinAcceptedChannelSize();
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return The minAcceptedChannelSize.
*/
long getMinAcceptedChannelSize();
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return Whether the expireTimeSecs field is set.
*/
boolean hasExpireTimeSecs();
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return The expireTimeSecs.
*/
long getExpireTimeSecs();
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return Whether the minPayment field is set.
*/
boolean hasMinPayment();
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return The minPayment.
*/
long getMinPayment();
}
/**
*
* Sent from server to client once version nego is done.
*
*
* Protobuf type {@code paymentchannels.Initiate}
*/
public static final class Initiate extends
com.google.protobuf.GeneratedMessageLite<
Initiate, Initiate.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.Initiate)
InitiateOrBuilder {
private Initiate() {
multisigKey_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int MULTISIG_KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString multisigKey_;
/**
*
* 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
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
@java.lang.Override
public boolean hasMultisigKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* 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
*
* 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
*
*
* required bytes multisig_key = 1;
* @param value The multisigKey to set.
*/
private void setMultisigKey(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000001;
multisigKey_ = value;
}
/**
*
* 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
*
*
* required bytes multisig_key = 1;
*/
private void clearMultisigKey() {
bitField0_ = (bitField0_ & ~0x00000001);
multisigKey_ = getDefaultInstance().getMultisigKey();
}
public static final int MIN_ACCEPTED_CHANNEL_SIZE_FIELD_NUMBER = 2;
private long minAcceptedChannelSize_;
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return Whether the minAcceptedChannelSize field is set.
*/
@java.lang.Override
public boolean hasMinAcceptedChannelSize() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return The minAcceptedChannelSize.
*/
@java.lang.Override
public long getMinAcceptedChannelSize() {
return minAcceptedChannelSize_;
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @param value The minAcceptedChannelSize to set.
*/
private void setMinAcceptedChannelSize(long value) {
bitField0_ |= 0x00000002;
minAcceptedChannelSize_ = value;
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
*/
private void clearMinAcceptedChannelSize() {
bitField0_ = (bitField0_ & ~0x00000002);
minAcceptedChannelSize_ = 0L;
}
public static final int EXPIRE_TIME_SECS_FIELD_NUMBER = 3;
private long expireTimeSecs_;
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return Whether the expireTimeSecs field is set.
*/
@java.lang.Override
public boolean hasExpireTimeSecs() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return The expireTimeSecs.
*/
@java.lang.Override
public long getExpireTimeSecs() {
return expireTimeSecs_;
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @param value The expireTimeSecs to set.
*/
private void setExpireTimeSecs(long value) {
bitField0_ |= 0x00000004;
expireTimeSecs_ = value;
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
*/
private void clearExpireTimeSecs() {
bitField0_ = (bitField0_ & ~0x00000004);
expireTimeSecs_ = 0L;
}
public static final int MIN_PAYMENT_FIELD_NUMBER = 4;
private long minPayment_;
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return Whether the minPayment field is set.
*/
@java.lang.Override
public boolean hasMinPayment() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return The minPayment.
*/
@java.lang.Override
public long getMinPayment() {
return minPayment_;
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @param value The minPayment to set.
*/
private void setMinPayment(long value) {
bitField0_ |= 0x00000008;
minPayment_ = value;
}
/**
*
* 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.
*
* Sent from server to client once version nego is done.
*
*
* Protobuf type {@code paymentchannels.Initiate}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.Initiate, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.Initiate)
org.bitcoin.paymentchannel.Protos.InitiateOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.Initiate.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* 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
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
@java.lang.Override
public boolean hasMultisigKey() {
return instance.hasMultisigKey();
}
/**
*
* 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
*
* 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
*
*
* required bytes multisig_key = 1;
* @param value The multisigKey to set.
* @return This builder for chaining.
*/
public Builder setMultisigKey(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setMultisigKey(value);
return this;
}
/**
*
* 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
*
*
* required bytes multisig_key = 1;
* @return This builder for chaining.
*/
public Builder clearMultisigKey() {
copyOnWrite();
instance.clearMultisigKey();
return this;
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return Whether the minAcceptedChannelSize field is set.
*/
@java.lang.Override
public boolean hasMinAcceptedChannelSize() {
return instance.hasMinAcceptedChannelSize();
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return The minAcceptedChannelSize.
*/
@java.lang.Override
public long getMinAcceptedChannelSize() {
return instance.getMinAcceptedChannelSize();
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @param value The minAcceptedChannelSize to set.
* @return This builder for chaining.
*/
public Builder setMinAcceptedChannelSize(long value) {
copyOnWrite();
instance.setMinAcceptedChannelSize(value);
return this;
}
/**
*
* 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.
*
*
* required uint64 min_accepted_channel_size = 2;
* @return This builder for chaining.
*/
public Builder clearMinAcceptedChannelSize() {
copyOnWrite();
instance.clearMinAcceptedChannelSize();
return this;
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return Whether the expireTimeSecs field is set.
*/
@java.lang.Override
public boolean hasExpireTimeSecs() {
return instance.hasExpireTimeSecs();
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return The expireTimeSecs.
*/
@java.lang.Override
public long getExpireTimeSecs() {
return instance.getExpireTimeSecs();
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @param value The expireTimeSecs to set.
* @return This builder for chaining.
*/
public Builder setExpireTimeSecs(long value) {
copyOnWrite();
instance.setExpireTimeSecs(value);
return this;
}
/**
*
* 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.
*
*
* required uint64 expire_time_secs = 3;
* @return This builder for chaining.
*/
public Builder clearExpireTimeSecs() {
copyOnWrite();
instance.clearExpireTimeSecs();
return this;
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return Whether the minPayment field is set.
*/
@java.lang.Override
public boolean hasMinPayment() {
return instance.hasMinPayment();
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return The minPayment.
*/
@java.lang.Override
public long getMinPayment() {
return instance.getMinPayment();
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @param value The minPayment to set.
* @return This builder for chaining.
*/
public Builder setMinPayment(long value) {
copyOnWrite();
instance.setMinPayment(value);
return this;
}
/**
*
* 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.
*
*
* required uint64 min_payment = 4;
* @return This builder for chaining.
*/
public Builder clearMinPayment() {
copyOnWrite();
instance.clearMinPayment();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.Initiate)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.Initiate();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"multisigKey_",
"minAcceptedChannelSize_",
"expireTimeSecs_",
"minPayment_",
};
java.lang.String info =
"\u0001\u0004\u0000\u0001\u0001\u0004\u0004\u0000\u0000\u0004\u0001\u150a\u0000\u0002" +
"\u1503\u0001\u0003\u1503\u0002\u0004\u1503\u0003";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.Initiate.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.Initiate)
private static final org.bitcoin.paymentchannel.Protos.Initiate DEFAULT_INSTANCE;
static {
Initiate defaultInstance = new Initiate();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
Initiate.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.Initiate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ProvideRefundOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.ProvideRefund)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
boolean hasMultisigKey();
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @return Whether the tx field is set.
*/
boolean hasTx();
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
* Sent from primary to secondary after Initiate to begin the refund transaction signing.
*
*
* Protobuf type {@code paymentchannels.ProvideRefund}
*/
public static final class ProvideRefund extends
com.google.protobuf.GeneratedMessageLite<
ProvideRefund, ProvideRefund.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.ProvideRefund)
ProvideRefundOrBuilder {
private ProvideRefund() {
multisigKey_ = com.google.protobuf.ByteString.EMPTY;
tx_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int MULTISIG_KEY_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString multisigKey_;
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
@java.lang.Override
public boolean hasMultisigKey() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @param value The multisigKey to set.
*/
private void setMultisigKey(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000001;
multisigKey_ = value;
}
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @param value The tx to set.
*/
private void setTx(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000002;
tx_ = value;
}
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
* Sent from primary to secondary after Initiate to begin the refund transaction signing.
*
*
* Protobuf type {@code paymentchannels.ProvideRefund}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.ProvideRefund, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.ProvideRefund)
org.bitcoin.paymentchannel.Protos.ProvideRefundOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.ProvideRefund.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @return Whether the multisigKey field is set.
*/
@java.lang.Override
public boolean hasMultisigKey() {
return instance.hasMultisigKey();
}
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @param value The multisigKey to set.
* @return This builder for chaining.
*/
public Builder setMultisigKey(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setMultisigKey(value);
return this;
}
/**
*
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* required bytes multisig_key = 1;
* @return This builder for chaining.
*/
public Builder clearMultisigKey() {
copyOnWrite();
instance.clearMultisigKey();
return this;
}
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return instance.hasTx();
}
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @param value The tx to set.
* @return This builder for chaining.
*/
public Builder setTx(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setTx(value);
return this;
}
/**
*
* The serialized bytes of the return transaction in Satoshi format.
* * It must have exactly one input which spends the multisig output (see ProvideContract for
* details of exactly what that output must look like). This output must have a sequence
* number of 0.
* * It must have the lock time set to a time after the min_time_window_secs (from the
* Initiate message).
* * It must have exactly one output which goes back to the primary. This output's
* scriptPubKey will be reused to create payment transactions.
*
*
* required bytes tx = 2;
* @return This builder for chaining.
*/
public Builder clearTx() {
copyOnWrite();
instance.clearTx();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.ProvideRefund)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.ProvideRefund();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"multisigKey_",
"tx_",
};
java.lang.String info =
"\u0001\u0002\u0000\u0001\u0001\u0002\u0002\u0000\u0000\u0002\u0001\u150a\u0000\u0002" +
"\u150a\u0001";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.ProvideRefund.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.ProvideRefund)
private static final org.bitcoin.paymentchannel.Protos.ProvideRefund DEFAULT_INSTANCE;
static {
ProvideRefund defaultInstance = new ProvideRefund();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ProvideRefund.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.ProvideRefund getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ReturnRefundOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.ReturnRefund)
com.google.protobuf.MessageLiteOrBuilder {
/**
* required bytes signature = 1;
* @return Whether the signature field is set.
*/
boolean hasSignature();
/**
* required bytes signature = 1;
* @return The signature.
*/
com.google.protobuf.ByteString getSignature();
}
/**
*
* Sent from secondary to primary after it has done initial verification of the refund
* transaction. Contains the primary's signature which is required to spend the multisig contract
* to the refund transaction. Must be signed using SIGHASH_NONE|SIGHASH_ANYONECANPAY (and include
* the postfix type byte) to allow the client to add any outputs/inputs it wants as long as the
* input's sequence and transaction's nLockTime remain set.
*
* Sent from secondary to primary after it has done initial verification of the refund
* transaction. Contains the primary's signature which is required to spend the multisig contract
* to the refund transaction. Must be signed using SIGHASH_NONE|SIGHASH_ANYONECANPAY (and include
* the postfix type byte) to allow the client to add any outputs/inputs it wants as long as the
* input's sequence and transaction's nLockTime remain set.
*
*
* Protobuf type {@code paymentchannels.ReturnRefund}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.ReturnRefund, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.ReturnRefund)
org.bitcoin.paymentchannel.Protos.ReturnRefundOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.ReturnRefund.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* required bytes signature = 1;
* @return Whether the signature field is set.
*/
@java.lang.Override
public boolean hasSignature() {
return instance.hasSignature();
}
/**
* required bytes signature = 1;
* @return The signature.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSignature() {
return instance.getSignature();
}
/**
* required bytes signature = 1;
* @param value The signature to set.
* @return This builder for chaining.
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setSignature(value);
return this;
}
/**
* required bytes signature = 1;
* @return This builder for chaining.
*/
public Builder clearSignature() {
copyOnWrite();
instance.clearSignature();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.ReturnRefund)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.ReturnRefund();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"signature_",
};
java.lang.String info =
"\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u0001\u0001\u150a\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.ReturnRefund.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.ReturnRefund)
private static final org.bitcoin.paymentchannel.Protos.ReturnRefund DEFAULT_INSTANCE;
static {
ReturnRefund defaultInstance = new ReturnRefund();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ReturnRefund.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.ReturnRefund getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ProvideContractOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.ProvideContract)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @return Whether the tx field is set.
*/
boolean hasTx();
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
*
* required .paymentchannels.UpdatePayment initial_payment = 2;
* @return Whether the initialPayment field is set.
*/
boolean hasInitialPayment();
/**
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @return Whether the clientKey field is set.
*/
boolean hasClientKey();
/**
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* Sent from the primary to the secondary to complete initialization.
*
*
* Protobuf type {@code paymentchannels.ProvideContract}
*/
public static final class ProvideContract extends
com.google.protobuf.GeneratedMessageLite<
ProvideContract, ProvideContract.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.ProvideContract)
ProvideContractOrBuilder {
private ProvideContract() {
tx_ = com.google.protobuf.ByteString.EMPTY;
clientKey_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int TX_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString tx_;
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @param value The tx to set.
*/
private void setTx(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000001;
tx_ = value;
}
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @return Whether the clientKey field is set.
*/
@java.lang.Override
public boolean hasClientKey() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @param value The clientKey to set.
*/
private void setClientKey(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000004;
clientKey_ = value;
}
/**
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* Sent from the primary to the secondary to complete initialization.
*
*
* Protobuf type {@code paymentchannels.ProvideContract}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.ProvideContract, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.ProvideContract)
org.bitcoin.paymentchannel.Protos.ProvideContractOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.ProvideContract.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return instance.hasTx();
}
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @param value The tx to set.
* @return This builder for chaining.
*/
public Builder setTx(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setTx(value);
return this;
}
/**
*
* The serialized bytes of the transaction in Satoshi format.
* For version 1:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a 2-of-2 multisig output with the first pubkey being the
* primary's and the second being the secondary's (ie the script must be exactly "OP_2
* ProvideRefund.multisig_key Initiate.multisig_key OP_2 OP_CHECKMULTISIG")
* For version 2:
* * It must be signed and completely valid and ready for broadcast (ie it includes the
* necessary fees) TODO: tell the client how much fee it needs
* * Its first output must be a CHECKLOCKTIMEVERIFY output with the first pubkey being the
* primary's and the second being the secondary's.
*
*
* required bytes tx = 1;
* @return This builder for chaining.
*/
public Builder clearTx() {
copyOnWrite();
instance.clearTx();
return this;
}
/**
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* To open the channel, an initial payment of the server-specified dust limit value must be
* provided. This ensures that the channel is never in an un-settleable state due to either
* no payment tx having been provided at all, or a payment that is smaller than the dust
* limit being provided.
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @return Whether the clientKey field is set.
*/
@java.lang.Override
public boolean hasClientKey() {
return instance.hasClientKey();
}
/**
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @param value The clientKey to set.
* @return This builder for chaining.
*/
public Builder setClientKey(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setClientKey(value);
return this;
}
/**
*
* This field is added in protocol version 2 to send the client public key to the server.
* In version 1 it isn't used.
* This must be a raw pubkey in regular ECDSA form. Both compressed and non-compressed forms
* are accepted. It is only used in the creation of the multisig contract.
*
*
* optional bytes client_key = 3;
* @return This builder for chaining.
*/
public Builder clearClientKey() {
copyOnWrite();
instance.clearClientKey();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.ProvideContract)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.ProvideContract();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"tx_",
"initialPayment_",
"clientKey_",
};
java.lang.String info =
"\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0002\u0001\u150a\u0000\u0002" +
"\u1509\u0001\u0003\u100a\u0002";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.ProvideContract.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.ProvideContract)
private static final org.bitcoin.paymentchannel.Protos.ProvideContract DEFAULT_INSTANCE;
static {
ProvideContract defaultInstance = new ProvideContract();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
ProvideContract.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.ProvideContract getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface UpdatePaymentOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.UpdatePayment)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return Whether the clientChangeValue field is set.
*/
boolean hasClientChangeValue();
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return The clientChangeValue.
*/
long getClientChangeValue();
/**
*
* 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.
*
*
* required bytes signature = 2;
* @return Whether the signature field is set.
*/
boolean hasSignature();
/**
*
* 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.
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return The info.
*/
com.google.protobuf.ByteString getInfo();
}
/**
*
* 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)
*
*
* Protobuf type {@code paymentchannels.UpdatePayment}
*/
public static final class UpdatePayment extends
com.google.protobuf.GeneratedMessageLite<
UpdatePayment, UpdatePayment.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.UpdatePayment)
UpdatePaymentOrBuilder {
private UpdatePayment() {
signature_ = com.google.protobuf.ByteString.EMPTY;
info_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int CLIENT_CHANGE_VALUE_FIELD_NUMBER = 1;
private long clientChangeValue_;
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return Whether the clientChangeValue field is set.
*/
@java.lang.Override
public boolean hasClientChangeValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return The clientChangeValue.
*/
@java.lang.Override
public long getClientChangeValue() {
return clientChangeValue_;
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @param value The clientChangeValue to set.
*/
private void setClientChangeValue(long value) {
bitField0_ |= 0x00000001;
clientChangeValue_ = value;
}
/**
*
* 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.
*
* 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.
*
*
* required bytes signature = 2;
* @return Whether the signature field is set.
*/
@java.lang.Override
public boolean hasSignature() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* 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.
*
* 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.
*
*
* required bytes signature = 2;
* @param value The signature to set.
*/
private void setSignature(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000002;
signature_ = value;
}
/**
*
* 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.
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return The info.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInfo() {
return info_;
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @param value The info to set.
*/
private void setInfo(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000004;
info_ = value;
}
/**
*
* Information about this update. Used to extend this protocol.
*
* 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)
*
*
* Protobuf type {@code paymentchannels.UpdatePayment}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.UpdatePayment, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.UpdatePayment)
org.bitcoin.paymentchannel.Protos.UpdatePaymentOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.UpdatePayment.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return Whether the clientChangeValue field is set.
*/
@java.lang.Override
public boolean hasClientChangeValue() {
return instance.hasClientChangeValue();
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return The clientChangeValue.
*/
@java.lang.Override
public long getClientChangeValue() {
return instance.getClientChangeValue();
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @param value The clientChangeValue to set.
* @return This builder for chaining.
*/
public Builder setClientChangeValue(long value) {
copyOnWrite();
instance.setClientChangeValue(value);
return this;
}
/**
*
* 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.
*
*
* required uint64 client_change_value = 1;
* @return This builder for chaining.
*/
public Builder clearClientChangeValue() {
copyOnWrite();
instance.clearClientChangeValue();
return this;
}
/**
*
* 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.
*
*
* required bytes signature = 2;
* @return Whether the signature field is set.
*/
@java.lang.Override
public boolean hasSignature() {
return instance.hasSignature();
}
/**
*
* 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.
*
* 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.
*
*
* required bytes signature = 2;
* @param value The signature to set.
* @return This builder for chaining.
*/
public Builder setSignature(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setSignature(value);
return this;
}
/**
*
* 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.
*
*
* required bytes signature = 2;
* @return This builder for chaining.
*/
public Builder clearSignature() {
copyOnWrite();
instance.clearSignature();
return this;
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return instance.hasInfo();
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return The info.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInfo() {
return instance.getInfo();
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @param value The info to set.
* @return This builder for chaining.
*/
public Builder setInfo(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setInfo(value);
return this;
}
/**
*
* Information about this update. Used to extend this protocol.
*
*
* optional bytes info = 3;
* @return This builder for chaining.
*/
public Builder clearInfo() {
copyOnWrite();
instance.clearInfo();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.UpdatePayment)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.UpdatePayment();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"clientChangeValue_",
"signature_",
"info_",
};
java.lang.String info =
"\u0001\u0003\u0000\u0001\u0001\u0003\u0003\u0000\u0000\u0002\u0001\u1503\u0000\u0002" +
"\u150a\u0001\u0003\u100a\u0002";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.UpdatePayment.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.UpdatePayment)
private static final org.bitcoin.paymentchannel.Protos.UpdatePayment DEFAULT_INSTANCE;
static {
UpdatePayment defaultInstance = new UpdatePayment();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
UpdatePayment.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.UpdatePayment getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface PaymentAckOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.PaymentAck)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return The info.
*/
com.google.protobuf.ByteString getInfo();
}
/**
*
* This message is sent as an acknowledgement of an UpdatePayment message
*
*
* Protobuf type {@code paymentchannels.PaymentAck}
*/
public static final class PaymentAck extends
com.google.protobuf.GeneratedMessageLite<
PaymentAck, PaymentAck.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.PaymentAck)
PaymentAckOrBuilder {
private PaymentAck() {
info_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int INFO_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString info_;
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return The info.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInfo() {
return info_;
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @param value The info to set.
*/
private void setInfo(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000001;
info_ = value;
}
/**
*
* Information about this update. Used to extend this protocol
*
* This message is sent as an acknowledgement of an UpdatePayment message
*
*
* Protobuf type {@code paymentchannels.PaymentAck}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.PaymentAck, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.PaymentAck)
org.bitcoin.paymentchannel.Protos.PaymentAckOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.PaymentAck.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return instance.hasInfo();
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return The info.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInfo() {
return instance.getInfo();
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @param value The info to set.
* @return This builder for chaining.
*/
public Builder setInfo(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setInfo(value);
return this;
}
/**
*
* Information about this update. Used to extend this protocol
*
*
* optional bytes info = 1;
* @return This builder for chaining.
*/
public Builder clearInfo() {
copyOnWrite();
instance.clearInfo();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.PaymentAck)
}
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.PaymentAck();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"info_",
};
java.lang.String info =
"\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u100a\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.PaymentAck.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return (byte) 1;
}
case SET_MEMOIZED_IS_INITIALIZED: {
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.PaymentAck)
private static final org.bitcoin.paymentchannel.Protos.PaymentAck DEFAULT_INSTANCE;
static {
PaymentAck defaultInstance = new PaymentAck();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
PaymentAck.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.PaymentAck getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface SettlementOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.Settlement)
com.google.protobuf.MessageLiteOrBuilder {
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @return Whether the tx field is set.
*/
boolean hasTx();
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @return The tx.
*/
com.google.protobuf.ByteString getTx();
}
/**
* Protobuf type {@code paymentchannels.Settlement}
*/
public static final class Settlement extends
com.google.protobuf.GeneratedMessageLite<
Settlement, Settlement.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.Settlement)
SettlementOrBuilder {
private Settlement() {
tx_ = com.google.protobuf.ByteString.EMPTY;
}
private int bitField0_;
public static final int TX_FIELD_NUMBER = 3;
private com.google.protobuf.ByteString tx_;
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @param value The tx to set.
*/
private void setTx(com.google.protobuf.ByteString value) {
value.getClass();
bitField0_ |= 0x00000001;
tx_ = value;
}
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @return Whether the tx field is set.
*/
@java.lang.Override
public boolean hasTx() {
return instance.hasTx();
}
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @param value The tx to set.
* @return This builder for chaining.
*/
public Builder setTx(com.google.protobuf.ByteString value) {
copyOnWrite();
instance.setTx(value);
return this;
}
/**
*
* A copy of the fully signed final contract that settles the channel. The client can verify
* the transaction is correct and then commit it to their wallet.
*
*
* required bytes tx = 3;
* @return This builder for chaining.
*/
public Builder clearTx() {
copyOnWrite();
instance.clearTx();
return this;
}
// @@protoc_insertion_point(builder_scope:paymentchannels.Settlement)
}
private byte memoizedIsInitialized = 2;
@java.lang.Override
@java.lang.SuppressWarnings({"unchecked", "fallthrough"})
protected final java.lang.Object dynamicMethod(
com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
java.lang.Object arg0, java.lang.Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE: {
return new org.bitcoin.paymentchannel.Protos.Settlement();
}
case NEW_BUILDER: {
return new Builder();
}
case BUILD_MESSAGE_INFO: {
java.lang.Object[] objects = new java.lang.Object[] {
"bitField0_",
"tx_",
};
java.lang.String info =
"\u0001\u0001\u0000\u0001\u0003\u0003\u0001\u0000\u0000\u0001\u0003\u150a\u0000";
return newMessageInfo(DEFAULT_INSTANCE, info, objects);
}
// fall through
case GET_DEFAULT_INSTANCE: {
return DEFAULT_INSTANCE;
}
case GET_PARSER: {
com.google.protobuf.Parser parser = PARSER;
if (parser == null) {
synchronized (org.bitcoin.paymentchannel.Protos.Settlement.class) {
parser = PARSER;
if (parser == null) {
parser =
new DefaultInstanceBasedParser(
DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
}
case GET_MEMOIZED_IS_INITIALIZED: {
return memoizedIsInitialized;
}
case SET_MEMOIZED_IS_INITIALIZED: {
memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
}
}
throw new UnsupportedOperationException();
}
// @@protoc_insertion_point(class_scope:paymentchannels.Settlement)
private static final org.bitcoin.paymentchannel.Protos.Settlement DEFAULT_INSTANCE;
static {
Settlement defaultInstance = new Settlement();
// New instances are implicitly immutable so no need to make
// immutable.
DEFAULT_INSTANCE = defaultInstance;
com.google.protobuf.GeneratedMessageLite.registerDefaultInstance(
Settlement.class, defaultInstance);
}
public static org.bitcoin.paymentchannel.Protos.Settlement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static volatile com.google.protobuf.Parser PARSER;
public static com.google.protobuf.Parser parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
public interface ErrorOrBuilder extends
// @@protoc_insertion_point(interface_extends:paymentchannels.Error)
com.google.protobuf.MessageLiteOrBuilder {
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @return Whether the code field is set.
*/
boolean hasCode();
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @return The code.
*/
org.bitcoin.paymentchannel.Protos.Error.ErrorCode getCode();
/**
*
* NOT SAFE FOR HTML WITHOUT ESCAPING
*
*
* optional string explanation = 2;
* @return Whether the explanation field is set.
*/
boolean hasExplanation();
/**
*
*
* optional string explanation = 2;
* @return The bytes for explanation.
*/
com.google.protobuf.ByteString
getExplanationBytes();
/**
*
* Can be set by the client when erroring to the server if a value was out of range. Can help with debugging.
*
*
* optional uint64 expected_value = 3;
* @return Whether the expectedValue field is set.
*/
boolean hasExpectedValue();
/**
*
* Can be set by the client when erroring to the server if a value was out of range. Can help with debugging.
*
*
* optional uint64 expected_value = 3;
* @return The expectedValue.
*/
long getExpectedValue();
}
/**
*
* An Error can be sent by either party at any time
* Both parties should make an effort to send either an ERROR or a CLOSE immediately before
* closing the socket (unless they just received an ERROR or a CLOSE)
*
*
* Protobuf type {@code paymentchannels.Error}
*/
public static final class Error extends
com.google.protobuf.GeneratedMessageLite<
Error, Error.Builder> implements
// @@protoc_insertion_point(message_implements:paymentchannels.Error)
ErrorOrBuilder {
private Error() {
code_ = 8;
explanation_ = "";
}
/**
* Protobuf enum {@code paymentchannels.Error.ErrorCode}
*/
public enum ErrorCode
implements com.google.protobuf.Internal.EnumLite {
/**
*
* Protocol timeout occurred (one party hung).
*
*
* TIMEOUT = 1;
*/
TIMEOUT(1),
/**
*
* Generic error indicating some message was not properly
*
* An Error can be sent by either party at any time
* Both parties should make an effort to send either an ERROR or a CLOSE immediately before
* closing the socket (unless they just received an ERROR or a CLOSE)
*
*
* Protobuf type {@code paymentchannels.Error}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageLite.Builder<
org.bitcoin.paymentchannel.Protos.Error, Builder> implements
// @@protoc_insertion_point(builder_implements:paymentchannels.Error)
org.bitcoin.paymentchannel.Protos.ErrorOrBuilder {
// Construct using org.bitcoin.paymentchannel.Protos.Error.newBuilder()
private Builder() {
super(DEFAULT_INSTANCE);
}
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @return Whether the code field is set.
*/
@java.lang.Override
public boolean hasCode() {
return instance.hasCode();
}
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @return The code.
*/
@java.lang.Override
public org.bitcoin.paymentchannel.Protos.Error.ErrorCode getCode() {
return instance.getCode();
}
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @param value The enum numeric value on the wire for code to set.
* @return This builder for chaining.
*/
public Builder setCode(org.bitcoin.paymentchannel.Protos.Error.ErrorCode value) {
copyOnWrite();
instance.setCode(value);
return this;
}
/**
* optional .paymentchannels.Error.ErrorCode code = 1 [default = OTHER];
* @return This builder for chaining.
*/
public Builder clearCode() {
copyOnWrite();
instance.clearCode();
return this;
}
/**
*
* NOT SAFE FOR HTML WITHOUT ESCAPING
*
*
* optional string explanation = 2;
* @return Whether the explanation field is set.
*/
@java.lang.Override
public boolean hasExplanation() {
return instance.hasExplanation();
}
/**
*