Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

public static final class Script.Builder

  1. Object
  2. Script.Builder
Appends opcodes and pushes to a script.

Methods

public Script.Builder op(int opcode)Appends one opcode.
public Script.Builder push(byte[] data)Appends a data push with the shortest push opcode for its length.
public Script.Builder number(long value)Appends a number as script arithmetic reads it: OP_0, OP_1NEGATE, OP_1..OP_16, or a minimal little-endian sign-magnitude push.
public Script build()The script.

Inherited methods

Method details

op

public Script.Builder op(int opcode)
Appends one opcode.

push

public Script.Builder push(byte[] data)
Appends a data push with the shortest push opcode for its length.

number

public Script.Builder number(long value)
Appends a number as script arithmetic reads it: OP_0, OP_1NEGATE, OP_1..OP_16, or a minimal little-endian sign-magnitude push.

build

public Script build()
The script.