@Test public void testScriptSig() throws Exception { byte[] sigProgBytes = HEX.decode(sigProg); Script script = new Script(sigProgBytes); assertEquals( "PUSHDATA(71)[304402202b4da291cc39faf8433911988f9f49fc5c995812ca2f94db61468839c228c3e90220628bff3ff32ec95825092fa051cba28558a981fcf59ce184b14f2e215e69106701] PUSHDATA(65)[0414b38f4be3bb9fa0f4f32b74af07152b2f2f630bc02122a491137b6c523e46f18a0d5034418966f93dfc37cc3739ef7b2007213a302b7fba161557f4ad644a1c]", script.toString()); }
@Override public String toString() { if (!chunks.isEmpty()) return Utils.SPACE_JOINER.join(chunks); else return "<empty>"; }
Script { @Override public String toString() { if (!chunks.isEmpty()) return Utils.SPACE_JOINER.join(chunks); else return "<empty>"; } }
Script { @Override public String toString() { if (!chunks.isEmpty()) return Utils.SPACE_JOINER.join(chunks); else return "<empty>"; } private  Script();   Script(List<ScriptChunk> chunks);  Script(byte[] programBytes);  Script(byte[] programBytes, long creationTimeSeconds); }
Script { @Override public String toString() { if (!chunks.isEmpty()) return Utils.SPACE_JOINER.join(chunks); else return "<empty>"; } private  Script();   Script(List<ScriptChunk> chunks);  Script(byte[] programBytes);  Script(byte[] programBytes, long creationTimeSeconds); long getCreationTimeSeconds(); void setCreationTimeSeconds(long creationTimeSeconds); @Override String toString(); byte[] getProgram(); List<ScriptChunk> getChunks(); @Deprecated boolean isSentToRawPubKey(); @Deprecated boolean isSentToAddress(); byte[] getPubKeyHash(); Address getToAddress(NetworkParameters params); Address getToAddress(NetworkParameters params, boolean forcePayToPubKey); static void writeBytes(OutputStream os, byte[] buf); static byte[] createMultiSigOutputScript(int threshold, List<ECKey> pubkeys); static byte[] createInputScript(byte[] signature, byte[] pubkey); static byte[] createInputScript(byte[] signature); Script createEmptyInputScript(@Nullable ECKey key, @Nullable Script redeemScript); TransactionWitness createEmptyWitness(ECKey key); Script getScriptSigWithSignature(Script scriptSig, byte[] sigBytes, int index); int getSigInsertionIndex(Sha256Hash hash, ECKey signingKey); List<ECKey> getPubKeys(); static int decodeFromOpN(int opcode); static int encodeToOpN(int value); static int getSigOpCount(byte[] program); static long getP2SHSigOpCount(byte[] scriptSig); int getNumberOfSignaturesRequiredToSpend(); int getNumberOfBytesRequiredToSpend(@Nullable ECKey pubKey, @Nullable Script redeemScript); @Deprecated boolean isPayToScriptHash(); @Deprecated boolean isSentToMultiSig(); static byte[] removeAllInstancesOf(byte[] inputScript, byte[] chunkToRemove); static byte[] removeAllInstancesOfOp(byte[] inputScript, int opCode); @Deprecated boolean isOpReturn(); @Deprecated static void executeScript(@Nullable Transaction txContainingThis, long index,
                                     Script script, LinkedList<byte[]> stack, boolean enforceNullDummy); static void executeScript(@Nullable Transaction txContainingThis, long index,
                                     Script script, LinkedList<byte[]> stack, Set<VerifyFlag> verifyFlags); @Deprecated void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey); void correctlySpends(Transaction txContainingThis, int scriptSigIndex, @Nullable TransactionWitness witness, @Nullable Coin value,
            Script scriptPubKey, Set<VerifyFlag> verifyFlags); void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey,
                                Set<VerifyFlag> verifyFlags); @Nullable ScriptType getScriptType(); @Override boolean equals(Object o); @Override int hashCode(); }
Script { @Override public String toString() { if (!chunks.isEmpty()) return Utils.SPACE_JOINER.join(chunks); else return "<empty>"; } private  Script();   Script(List<ScriptChunk> chunks);  Script(byte[] programBytes);  Script(byte[] programBytes, long creationTimeSeconds); long getCreationTimeSeconds(); void setCreationTimeSeconds(long creationTimeSeconds); @Override String toString(); byte[] getProgram(); List<ScriptChunk> getChunks(); @Deprecated boolean isSentToRawPubKey(); @Deprecated boolean isSentToAddress(); byte[] getPubKeyHash(); Address getToAddress(NetworkParameters params); Address getToAddress(NetworkParameters params, boolean forcePayToPubKey); static void writeBytes(OutputStream os, byte[] buf); static byte[] createMultiSigOutputScript(int threshold, List<ECKey> pubkeys); static byte[] createInputScript(byte[] signature, byte[] pubkey); static byte[] createInputScript(byte[] signature); Script createEmptyInputScript(@Nullable ECKey key, @Nullable Script redeemScript); TransactionWitness createEmptyWitness(ECKey key); Script getScriptSigWithSignature(Script scriptSig, byte[] sigBytes, int index); int getSigInsertionIndex(Sha256Hash hash, ECKey signingKey); List<ECKey> getPubKeys(); static int decodeFromOpN(int opcode); static int encodeToOpN(int value); static int getSigOpCount(byte[] program); static long getP2SHSigOpCount(byte[] scriptSig); int getNumberOfSignaturesRequiredToSpend(); int getNumberOfBytesRequiredToSpend(@Nullable ECKey pubKey, @Nullable Script redeemScript); @Deprecated boolean isPayToScriptHash(); @Deprecated boolean isSentToMultiSig(); static byte[] removeAllInstancesOf(byte[] inputScript, byte[] chunkToRemove); static byte[] removeAllInstancesOfOp(byte[] inputScript, int opCode); @Deprecated boolean isOpReturn(); @Deprecated static void executeScript(@Nullable Transaction txContainingThis, long index,
                                     Script script, LinkedList<byte[]> stack, boolean enforceNullDummy); static void executeScript(@Nullable Transaction txContainingThis, long index,
                                     Script script, LinkedList<byte[]> stack, Set<VerifyFlag> verifyFlags); @Deprecated void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey); void correctlySpends(Transaction txContainingThis, int scriptSigIndex, @Nullable TransactionWitness witness, @Nullable Coin value,
            Script scriptPubKey, Set<VerifyFlag> verifyFlags); void correctlySpends(Transaction txContainingThis, long scriptSigIndex, Script scriptPubKey,
                                Set<VerifyFlag> verifyFlags); @Nullable ScriptType getScriptType(); @Override boolean equals(Object o); @Override int hashCode(); static final EnumSet<VerifyFlag> ALL_VERIFY_FLAGS; static final long MAX_SCRIPT_ELEMENT_SIZE; static final int SIG_SIZE; static final int MAX_P2SH_SIGOPS; }