/** * Creates an input that connects to nothing - used only in creation of coinbase transactions. */ public TransactionInput(NetworkParameters params, @Nullable Transaction parentTransaction, byte[] scriptBytes) { this(params, parentTransaction, scriptBytes, new TransactionOutPoint(params, UNCONNECTED, (Transaction) null)); }
/** * Creates an input that connects to nothing - used only in creation of coinbase transactions. */ public TransactionInput(NetworkParameters params, @Nullable Transaction parentTransaction, byte[] scriptBytes) { this(params, parentTransaction, scriptBytes, new TransactionOutPoint(params, UNCONNECTED, (Transaction) null)); }
/** * Creates an input that connects to nothing - used only in creation of coinbase transactions. */ public TransactionInput(NetworkParameters params, @Nullable Transaction parentTransaction, byte[] scriptBytes) { this(params, parentTransaction, scriptBytes, new TransactionOutPoint(params, UNCONNECTED, (Transaction) null)); }
/** * Creates an input that connects to nothing - used only in creation of coinbase transactions. */ public TransactionInput(NetworkParameters params, @Nullable Transaction parentTransaction, byte[] scriptBytes) { this(params, parentTransaction, scriptBytes, new TransactionOutPoint(params, UNCONNECTED, (Transaction) null)); }
/** * Creates and adds an input to this transaction, with no checking that it's valid. * @return the newly created input. */ public TransactionInput addInput(Sha256Hash spendTxHash, long outputIndex, Script script) { return addInput(new TransactionInput(params, this, script.getProgram(), new TransactionOutPoint(params, outputIndex, spendTxHash))); }
/** * Creates and adds an input to this transaction, with no checking that it's valid. * @return the newly created input. */ public TransactionInput addInput(Sha256Hash spendTxHash, long outputIndex, Script script) { return addInput( new TransactionInput( params, this, script.getProgram(), new TransactionOutPoint(params, outputIndex, spendTxHash))); }
/** * Creates and adds an input to this transaction, with no checking that it's valid. * @return the newly created input. */ public TransactionInput addInput(Sha256Hash spendTxHash, long outputIndex, Script script) { return addInput(new TransactionInput(params, this, script.getProgram(), new TransactionOutPoint(params, outputIndex, spendTxHash))); }
/** * Creates and adds an input to this transaction, with no checking that it's valid. * @return the newly created input. */ public TransactionInput addInput(Sha256Hash spendTxHash, long outputIndex, Script script) { return addInput(new TransactionInput(params, this, script.getProgram(), new TransactionOutPoint(params, outputIndex, spendTxHash))); }
public Transaction getServerTransaction () { Preconditions.checkNotNull(channel); return getChannelTransaction( new TransactionOutPoint(Constants.getNetwork(), 0, channel.anchorTxHash), newStatus, channel.keyServer, channel.keyClient); }
@Override protected void parse() throws ProtocolException { includeMempool = readBytes(1)[0] == 1; long numOutpoints = readVarInt(); ImmutableList.Builder<TransactionOutPoint> list = ImmutableList.builder(); for (int i = 0; i < numOutpoints; i++) { TransactionOutPoint outPoint = new TransactionOutPoint(params, payload, cursor); list.add(outPoint); cursor += outPoint.getMessageSize(); } outPoints = list.build(); length = cursor; }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
/** * Returns a new {@link TransactionOutPoint}, which is essentially a structure pointing to this output. * Requires that this output is not detached. */ public TransactionOutPoint getOutPointFor() { return new TransactionOutPoint(params, getIndex(), getParentTransaction()); }
public List<TransactionOutPoint> listUnspentOutPoints(Address fromAddress) throws JsonRpcStatusException, IOException { List<Address> addresses = Collections.singletonList(fromAddress); List<UnspentOutput> unspentOutputsRPC = listUnspent(0, defaultMaxConf, addresses); // RPC UnspentOutput objects List<TransactionOutPoint> unspentOutPoints = new ArrayList<TransactionOutPoint>(); for (UnspentOutput it : unspentOutputsRPC) { unspentOutPoints.add(new TransactionOutPoint(getNetParams(), it.getVout(), it.getTxid())); } return unspentOutPoints; } }
public Transaction getClientTransaction () { Preconditions.checkNotNull(channel); return getChannelTransaction( new TransactionOutPoint(Constants.getNetwork(), 0, channel.anchorTxHash), newStatus.getCloneReversed(), channel.keyClient, channel.keyServer); }
private Map<TransactionOutPoint, Script> parseScriptPubKeys(JsonNode inputs) throws IOException { Map<TransactionOutPoint, Script> scriptPubKeys = new HashMap<>(); for (JsonNode input : inputs) { String hash = input.get(0).asText(); int index = input.get(1).asInt(); String script = input.get(2).asText(); Sha256Hash sha256Hash = Sha256Hash.wrap(HEX.decode(hash)); scriptPubKeys.put(new TransactionOutPoint(PARAMS, index, sha256Hash), parseScriptString(script)); } return scriptPubKeys; }
@Override protected void parse() throws ProtocolException { outpoint = new TransactionOutPoint(params, payload, cursor, this, serializer); cursor += outpoint.getMessageSize(); int scriptLen = (int) readVarInt(); length = cursor - offset + scriptLen + 4; scriptBytes = readBytes(scriptLen); sequence = readUint32(); }
@Override protected void parse() throws ProtocolException { outpoint = new TransactionOutPoint(params, payload, cursor, this, serializer); cursor += outpoint.getMessageSize(); int scriptLen = (int) readVarInt(); length = cursor - offset + scriptLen + 4; scriptBytes = readBytes(scriptLen); sequence = readUint32(); }
public TransactionOutPointWithValue(Transaction tx, int output) { this(new TransactionOutPoint(tx.getParams(), output, tx.getHash()), tx.getOutput(output).getValue(), tx.getOutput(output).getScriptPubKey()); } }