/** * <code>repeated .com.openwallet.core.protos.UnspentOutput unspent_output = 10;</code> */ public Builder addUnspentOutput( int index, com.openwallet.core.protos.Protos.UnspentOutput.Builder builderForValue) { if (unspentOutputBuilder_ == null) { ensureUnspentOutputIsMutable(); unspentOutput_.add(index, builderForValue.build()); onChanged(); } else { unspentOutputBuilder_.addMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .com.openwallet.core.protos.UnspentOutput unspent_output = 10;</code> */ public Builder setUnspentOutput( int index, com.openwallet.core.protos.Protos.UnspentOutput.Builder builderForValue) { if (unspentOutputBuilder_ == null) { ensureUnspentOutputIsMutable(); unspentOutput_.set(index, builderForValue.build()); onChanged(); } else { unspentOutputBuilder_.setMessage(index, builderForValue.build()); } return this; } /**
/** * <code>repeated .com.openwallet.core.protos.UnspentOutput unspent_output = 10;</code> */ public Builder addUnspentOutput( com.openwallet.core.protos.Protos.UnspentOutput.Builder builderForValue) { if (unspentOutputBuilder_ == null) { ensureUnspentOutputIsMutable(); unspentOutput_.add(builderForValue.build()); onChanged(); } else { unspentOutputBuilder_.addMessage(builderForValue.build()); } return this; } /**
private static Protos.UnspentOutput makeUTXOProto(OutPointOutput utxo) { Protos.UnspentOutput.Builder utxoBuilder = Protos.UnspentOutput.newBuilder(); utxoBuilder.setOutPointHash(ByteString.copyFrom(utxo.getTxHash().getBytes())); utxoBuilder.setOutPointIndex((int) utxo.getIndex()); utxoBuilder.setScriptBytes(ByteString.copyFrom(utxo.getScriptBytes())); utxoBuilder.setValue(utxo.getValueLong()); if (utxo.isGenerated()) utxoBuilder.setIsGenerated(true); return utxoBuilder.build(); }