ClientState.StoredClientPaymentChannels states = ClientState.StoredClientPaymentChannels.parseFrom(data); for (ClientState.StoredClientPaymentChannel storedState : states.getChannelsList()) { Transaction refundTransaction = params.getDefaultSerializer().makeTransaction(storedState.getRefundTransaction().toByteArray()); refundTransaction.getConfidence().setSource(TransactionConfidence.Source.SELF); ECKey myKey = (storedState.getMyKey().isEmpty()) ? containingWallet.findKeyFromPubKey(storedState.getMyPublicKey().toByteArray()) : ECKey.fromPrivate(storedState.getMyKey().toByteArray()); ECKey serverKey = storedState.hasServerKey() ? ECKey.fromPublicOnly(storedState.getServerKey().toByteArray()) : null; StoredClientChannel channel = new StoredClientChannel(storedState.getMajorVersion(), Sha256Hash.wrap(storedState.getId().toByteArray()), params.getDefaultSerializer().makeTransaction(storedState.getContractTransaction().toByteArray()), refundTransaction, myKey, serverKey, Coin.valueOf(storedState.getValueToMe()), Coin.valueOf(storedState.getRefundFees()), storedState.getExpiryTime(), false); if (storedState.hasCloseTransactionHash()) { Sha256Hash closeTxHash = Sha256Hash.wrap(storedState.getCloseTransactionHash().toByteArray()); channel.close = containingWallet.getTransaction(closeTxHash);
/** * <code>repeated .paymentchannels.StoredClientPaymentChannel channels = 1;</code> */ public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.Builder addChannelsBuilder( int index) { return getChannelsFieldBuilder().addBuilder( index, org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()); } /**
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel buildPartial() { org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel result = new org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0;
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) { if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); if (other.hasContractTransaction()) { setContractTransaction(other.getContractTransaction()); if (other.hasRefundTransaction()) { setRefundTransaction(other.getRefundTransaction()); if (other.hasMyPublicKey()) { setMyPublicKey(other.getMyPublicKey()); if (other.hasMyKey()) { setMyKey(other.getMyKey()); if (other.hasValueToMe()) { setValueToMe(other.getValueToMe()); if (other.hasRefundFees()) { setRefundFees(other.getRefundFees()); if (other.hasCloseTransactionHash()) { setCloseTransactionHash(other.getCloseTransactionHash()); if (other.hasMajorVersion()) { setMajorVersion(other.getMajorVersion()); if (other.hasExpiryTime()) {
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) { if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); if (other.hasContractTransaction()) { setContractTransaction(other.getContractTransaction()); if (other.hasRefundTransaction()) { setRefundTransaction(other.getRefundTransaction()); if (other.hasMyPublicKey()) { setMyPublicKey(other.getMyPublicKey()); if (other.hasMyKey()) { setMyKey(other.getMyKey()); if (other.hasValueToMe()) { setValueToMe(other.getValueToMe()); if (other.hasRefundFees()) { setRefundFees(other.getRefundFees()); if (other.hasCloseTransactionHash()) { setCloseTransactionHash(other.getCloseTransactionHash()); if (other.hasMajorVersion()) { setMajorVersion(other.getMajorVersion()); if (other.hasExpiryTime()) {
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) { if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); if (other.hasContractTransaction()) { setContractTransaction(other.getContractTransaction()); if (other.hasRefundTransaction()) { setRefundTransaction(other.getRefundTransaction()); if (other.hasMyPublicKey()) { setMyPublicKey(other.getMyPublicKey()); if (other.hasMyKey()) { setMyKey(other.getMyKey()); if (other.hasValueToMe()) { setValueToMe(other.getValueToMe()); if (other.hasRefundFees()) { setRefundFees(other.getRefundFees()); if (other.hasCloseTransactionHash()) { setCloseTransactionHash(other.getCloseTransactionHash()); if (other.hasMajorVersion()) { setMajorVersion(other.getMajorVersion()); if (other.hasExpiryTime()) {
public Builder mergeFrom(org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel other) { if (other == org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); if (other.hasContractTransaction()) { setContractTransaction(other.getContractTransaction()); if (other.hasRefundTransaction()) { setRefundTransaction(other.getRefundTransaction()); if (other.hasMyPublicKey()) { setMyPublicKey(other.getMyPublicKey()); if (other.hasMyKey()) { setMyKey(other.getMyKey()); if (other.hasValueToMe()) { setValueToMe(other.getValueToMe()); if (other.hasRefundFees()) { setRefundFees(other.getRefundFees()); if (other.hasCloseTransactionHash()) { setCloseTransactionHash(other.getCloseTransactionHash()); if (other.hasMajorVersion()) { setMajorVersion(other.getMajorVersion()); if (other.hasExpiryTime()) {
ClientState.StoredClientPaymentChannels states = ClientState.StoredClientPaymentChannels.parseFrom(data); for (ClientState.StoredClientPaymentChannel storedState : states.getChannelsList()) { Transaction refundTransaction = params.getDefaultSerializer().makeTransaction(storedState.getRefundTransaction().toByteArray()); refundTransaction.getConfidence().setSource(TransactionConfidence.Source.SELF); ECKey myKey = (storedState.getMyKey().isEmpty()) ? containingWallet.findKeyFromPubKey(storedState.getMyPublicKey().toByteArray()) : ECKey.fromPrivate(storedState.getMyKey().toByteArray()); ECKey serverKey = storedState.hasServerKey() ? ECKey.fromPublicOnly(storedState.getServerKey().toByteArray()) : null; StoredClientChannel channel = new StoredClientChannel(storedState.getMajorVersion(), Sha256Hash.wrap(storedState.getId().toByteArray()), params.getDefaultSerializer().makeTransaction(storedState.getContractTransaction().toByteArray()), refundTransaction, myKey, serverKey, Coin.valueOf(storedState.getValueToMe()), Coin.valueOf(storedState.getRefundFees()), storedState.getExpiryTime(), false); if (storedState.hasCloseTransactionHash()) { Sha256Hash closeTxHash = Sha256Hash.wrap(storedState.getCloseTransactionHash().toByteArray()); channel.close = containingWallet.getTransaction(closeTxHash);
ClientState.StoredClientPaymentChannels states = ClientState.StoredClientPaymentChannels.parseFrom(data); for (ClientState.StoredClientPaymentChannel storedState : states.getChannelsList()) { Transaction refundTransaction = params.getDefaultSerializer().makeTransaction(storedState.getRefundTransaction().toByteArray()); refundTransaction.getConfidence().setSource(TransactionConfidence.Source.SELF); ECKey myKey = (storedState.getMyKey().isEmpty()) ? containingWallet.findKeyFromPubKey(storedState.getMyPublicKey().toByteArray()) : ECKey.fromPrivate(storedState.getMyKey().toByteArray()); ECKey serverKey = storedState.hasServerKey() ? ECKey.fromPublicOnly(storedState.getServerKey().toByteArray()) : null; StoredClientChannel channel = new StoredClientChannel(storedState.getMajorVersion(), Sha256Hash.wrap(storedState.getId().toByteArray()), params.getDefaultSerializer().makeTransaction(storedState.getContractTransaction().toByteArray()), refundTransaction, myKey, serverKey, Coin.valueOf(storedState.getValueToMe()), Coin.valueOf(storedState.getRefundFees()), storedState.getExpiryTime(), false); if (storedState.hasCloseTransactionHash()) { Sha256Hash closeTxHash = Sha256Hash.wrap(storedState.getCloseTransactionHash().toByteArray()); channel.close = containingWallet.getTransaction(closeTxHash);
ClientState.StoredClientPaymentChannels states = ClientState.StoredClientPaymentChannels.parseFrom(data); for (ClientState.StoredClientPaymentChannel storedState : states.getChannelsList()) { Transaction refundTransaction = params.getDefaultSerializer().makeTransaction(storedState.getRefundTransaction().toByteArray()); refundTransaction.getConfidence().setSource(TransactionConfidence.Source.SELF); ECKey myKey = (storedState.getMyKey().isEmpty()) ? containingWallet.findKeyFromPubKey(storedState.getMyPublicKey().toByteArray()) : ECKey.fromPrivate(storedState.getMyKey().toByteArray()); ECKey serverKey = storedState.hasServerKey() ? ECKey.fromPublicOnly(storedState.getServerKey().toByteArray()) : null; StoredClientChannel channel = new StoredClientChannel(storedState.getMajorVersion(), Sha256Hash.wrap(storedState.getId().toByteArray()), params.getDefaultSerializer().makeTransaction(storedState.getContractTransaction().toByteArray()), refundTransaction, myKey, serverKey, Coin.valueOf(storedState.getValueToMe()), Coin.valueOf(storedState.getRefundFees()), storedState.getExpiryTime(), false); if (storedState.hasCloseTransactionHash()) { Sha256Hash closeTxHash = Sha256Hash.wrap(storedState.getCloseTransactionHash().toByteArray()); channel.close = containingWallet.getTransaction(closeTxHash);
/** * <code>optional bytes closeTransactionHash = 7;</code> * * <pre> * When set, the hash of the transaction that was presented by the server for closure of the channel. * It spends the contractTransaction and is expected to be broadcast to the network by the server. * It's supposed to be in the wallet already. * </pre> */ public Builder clearCloseTransactionHash() { bitField0_ = (bitField0_ & ~0x00000080); closeTransactionHash_ = getDefaultInstance().getCloseTransactionHash(); onChanged(); return this; }
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() { return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance(); }
/** * <code>optional bytes closeTransactionHash = 7;</code> * * <pre> * When set, the hash of the transaction that was presented by the server for closure of the channel. * It spends the contractTransaction and is expected to be broadcast to the network by the server. * It's supposed to be in the wallet already. * </pre> */ public Builder clearCloseTransactionHash() { bitField0_ = (bitField0_ & ~0x00000080); closeTransactionHash_ = getDefaultInstance().getCloseTransactionHash(); onChanged(); return this; }
/** * <code>optional bytes closeTransactionHash = 7;</code> * * <pre> * When set, the hash of the transaction that was presented by the server for closure of the channel. * It spends the contractTransaction and is expected to be broadcast to the network by the server. * It's supposed to be in the wallet already. * </pre> */ public Builder clearCloseTransactionHash() { bitField0_ = (bitField0_ & ~0x00000080); closeTransactionHash_ = getDefaultInstance().getCloseTransactionHash(); onChanged(); return this; }
/** * <code>optional bytes closeTransactionHash = 7;</code> * * <pre> * When set, the hash of the transaction that was presented by the server for closure of the channel. * It spends the contractTransaction and is expected to be broadcast to the network by the server. * It's supposed to be in the wallet already. * </pre> */ public Builder clearCloseTransactionHash() { bitField0_ = (bitField0_ & ~0x00000080); closeTransactionHash_ = getDefaultInstance().getCloseTransactionHash(); onChanged(); return this; }
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() { return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance(); }
public org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel getDefaultInstanceForType() { return org.bitcoinj.protocols.channels.ClientState.StoredClientPaymentChannel.getDefaultInstance(); }