@Test public void buildVerificationScriptFromSinglePublicKey() { final String key = "035fdb1d1f06759547020891ae97c729327853aeb1256b6fe0473bc2e9fa42ff50"; byte[] script = ScriptBuilder.buildVerificationScript(Numeric.hexStringToByteArray(key)); byte[] expected = Numeric.hexStringToByteArray("" + OpCode.PUSHDATA1.toString() + "21" + key + OpCode.PUSHNULL.toString() + OpCode.SYSCALL.toString() + InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1.getHash() ); assertArrayEquals(expected, script); }
public static byte[] buildVerificationScript(byte[] encodedPublicKey) { return new ScriptBuilder() .pushData(encodedPublicKey) .opCode(OpCode.PUSHNULL) .sysCall(InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1) .toArray(); }
ScriptBuilder { public static byte[] buildVerificationScript(byte[] encodedPublicKey) { return new ScriptBuilder() .pushData(encodedPublicKey) .opCode(OpCode.PUSHNULL) .sysCall(InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1) .toArray(); } }
ScriptBuilder { public static byte[] buildVerificationScript(byte[] encodedPublicKey) { return new ScriptBuilder() .pushData(encodedPublicKey) .opCode(OpCode.PUSHNULL) .sysCall(InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1) .toArray(); } ScriptBuilder(); }
ScriptBuilder { public static byte[] buildVerificationScript(byte[] encodedPublicKey) { return new ScriptBuilder() .pushData(encodedPublicKey) .opCode(OpCode.PUSHNULL) .sysCall(InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1) .toArray(); } ScriptBuilder(); ScriptBuilder opCode(OpCode opCode); ScriptBuilder opCode(OpCode opCode, byte[] argument); ScriptBuilder contractCall(ScriptHash scriptHash, String method,
            List<ContractParameter> params); ScriptBuilder sysCall(InteropServiceCode operation); ScriptBuilder pushParams(List<ContractParameter> params); ScriptBuilder pushParam(ContractParameter param); ScriptBuilder pushInteger(int v); ScriptBuilder pushInteger(BigInteger v); ScriptBuilder pushBoolean(boolean bool); ScriptBuilder pushData(String data); ScriptBuilder pushData(byte[] data); ScriptBuilder pushArray(ContractParameter[] params); ScriptBuilder pack(); byte[] toArray(); static byte[] buildVerificationScript(byte[] encodedPublicKey); static byte[] buildVerificationScript(List<byte[]> encodedPublicKeys,
            int signingThreshold); }
ScriptBuilder { public static byte[] buildVerificationScript(byte[] encodedPublicKey) { return new ScriptBuilder() .pushData(encodedPublicKey) .opCode(OpCode.PUSHNULL) .sysCall(InteropServiceCode.NEO_CRYPTO_VERIFYWITHECDSASECP256R1) .toArray(); } ScriptBuilder(); ScriptBuilder opCode(OpCode opCode); ScriptBuilder opCode(OpCode opCode, byte[] argument); ScriptBuilder contractCall(ScriptHash scriptHash, String method,
            List<ContractParameter> params); ScriptBuilder sysCall(InteropServiceCode operation); ScriptBuilder pushParams(List<ContractParameter> params); ScriptBuilder pushParam(ContractParameter param); ScriptBuilder pushInteger(int v); ScriptBuilder pushInteger(BigInteger v); ScriptBuilder pushBoolean(boolean bool); ScriptBuilder pushData(String data); ScriptBuilder pushData(byte[] data); ScriptBuilder pushArray(ContractParameter[] params); ScriptBuilder pack(); byte[] toArray(); static byte[] buildVerificationScript(byte[] encodedPublicKey); static byte[] buildVerificationScript(List<byte[]> encodedPublicKeys,
            int signingThreshold);  }