@Test public void testOpTrue() { byte[] expected = new byte[] { OP_TRUE }; byte[] s = new ScriptBuilder().opTrue().build().getProgram(); assertArrayEquals(expected, s); }
public ScriptBuilder opTrue() { return number(1); }
ScriptBuilder { public ScriptBuilder opTrue() { return number(1); } }
ScriptBuilder { public ScriptBuilder opTrue() { return number(1); } ScriptBuilder();  ScriptBuilder(Script template); }
ScriptBuilder { public ScriptBuilder opTrue() { return number(1); } ScriptBuilder();  ScriptBuilder(Script template); ScriptBuilder addChunk(ScriptChunk chunk); ScriptBuilder addChunk(int index, ScriptChunk chunk); ScriptBuilder op(int opcode); ScriptBuilder op(int index, int opcode); ScriptBuilder data(byte[] data); ScriptBuilder data(int index, byte[] data); ScriptBuilder number(long num); ScriptBuilder number(int index, long num); ScriptBuilder smallNum(int num); ScriptBuilder smallNum(int index, int num); ScriptBuilder opTrue(); ScriptBuilder opTrue(int index); ScriptBuilder opFalse(); ScriptBuilder opFalse(int index); Script build(); static Script createEmpty(); static Script createOutputScript(Address to); static Script createInputScript(@Nullable TransactionSignature signature, ECKey pubKey); static Script createInputScript(@Nullable TransactionSignature signature); static Script createMultiSigOutputScript(int threshold, List<ECKey> pubkeys); static Script createMultiSigInputScript(List<TransactionSignature> signatures); static Script createMultiSigInputScript(TransactionSignature... signatures); static Script createMultiSigInputScriptBytes(List<byte[]> signatures); static Script createP2SHMultiSigInputScript(@Nullable List<TransactionSignature> signatures,
                                                       Script multisigProgram); static Script createMultiSigInputScriptBytes(List<byte[]> signatures, @Nullable byte[] multisigProgramBytes); static Script updateScriptWithSignature(Script scriptSig, byte[] signature, int targetIndex,
                                                   int sigsPrefixCount, int sigsSuffixCount); static Script createP2PKOutputScript(byte[] pubKey); static Script createP2PKOutputScript(ECKey pubKey); static Script createP2PKHOutputScript(byte[] hash); static Script createP2PKHOutputScript(ECKey key); static Script createP2WPKHOutputScript(byte[] hash); static Script createP2WPKHOutputScript(ECKey key); static Script createP2SHOutputScript(byte[] hash); static Script createP2SHOutputScript(Script redeemScript); static Script createP2WSHOutputScript(byte[] hash); static Script createP2WSHOutputScript(Script redeemScript); static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys); static Script createRedeemScript(int threshold, List<ECKey> pubkeys); static Script createOpReturnScript(byte[] data); }
ScriptBuilder { public ScriptBuilder opTrue() { return number(1); } ScriptBuilder();  ScriptBuilder(Script template); ScriptBuilder addChunk(ScriptChunk chunk); ScriptBuilder addChunk(int index, ScriptChunk chunk); ScriptBuilder op(int opcode); ScriptBuilder op(int index, int opcode); ScriptBuilder data(byte[] data); ScriptBuilder data(int index, byte[] data); ScriptBuilder number(long num); ScriptBuilder number(int index, long num); ScriptBuilder smallNum(int num); ScriptBuilder smallNum(int index, int num); ScriptBuilder opTrue(); ScriptBuilder opTrue(int index); ScriptBuilder opFalse(); ScriptBuilder opFalse(int index); Script build(); static Script createEmpty(); static Script createOutputScript(Address to); static Script createInputScript(@Nullable TransactionSignature signature, ECKey pubKey); static Script createInputScript(@Nullable TransactionSignature signature); static Script createMultiSigOutputScript(int threshold, List<ECKey> pubkeys); static Script createMultiSigInputScript(List<TransactionSignature> signatures); static Script createMultiSigInputScript(TransactionSignature... signatures); static Script createMultiSigInputScriptBytes(List<byte[]> signatures); static Script createP2SHMultiSigInputScript(@Nullable List<TransactionSignature> signatures,
                                                       Script multisigProgram); static Script createMultiSigInputScriptBytes(List<byte[]> signatures, @Nullable byte[] multisigProgramBytes); static Script updateScriptWithSignature(Script scriptSig, byte[] signature, int targetIndex,
                                                   int sigsPrefixCount, int sigsSuffixCount); static Script createP2PKOutputScript(byte[] pubKey); static Script createP2PKOutputScript(ECKey pubKey); static Script createP2PKHOutputScript(byte[] hash); static Script createP2PKHOutputScript(ECKey key); static Script createP2WPKHOutputScript(byte[] hash); static Script createP2WPKHOutputScript(ECKey key); static Script createP2SHOutputScript(byte[] hash); static Script createP2SHOutputScript(Script redeemScript); static Script createP2WSHOutputScript(byte[] hash); static Script createP2WSHOutputScript(Script redeemScript); static Script createP2SHOutputScript(int threshold, List<ECKey> pubkeys); static Script createRedeemScript(int threshold, List<ECKey> pubkeys); static Script createOpReturnScript(byte[] data);  }