public class ScriptBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ScriptBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ScriptBuilder |
appCall(byte[] scriptHash)
Appends an app call to the script.
|
ScriptBuilder |
appCall(byte[] scriptHash,
java.util.List<ContractParameter> params)
Appends an app call to the script.
|
ScriptBuilder |
appCall(byte[] scriptHash,
java.lang.String operation)
Appends an app call to the script.
|
ScriptBuilder |
appCall(byte[] scriptHash,
java.lang.String operation,
java.util.List<ContractParameter> params)
Appends an app call to the script.
|
ScriptBuilder |
opCode(OpCode opCode)
Appends an OpCode to the script.
|
ScriptBuilder |
pushArray(ContractParameter[] params) |
ScriptBuilder |
pushBoolean(boolean bool) |
ScriptBuilder |
pushData(byte[] data)
Adds the data to the script, prefixed with the correct code for its length.
|
ScriptBuilder |
pushData(java.lang.String data)
Adds the data to the script, prefixed with the correct code for its length.
|
ScriptBuilder |
pushDataLength(int length) |
ScriptBuilder |
pushInteger(java.math.BigInteger number) |
ScriptBuilder |
pushInteger(int v) |
ScriptBuilder |
pushParam(ContractParameter param) |
ScriptBuilder |
sysCall(java.lang.String operation) |
ScriptBuilder |
tailCall(byte[] scriptHash)
Appends a tail call to the script.
|
byte[] |
toArray() |
public ScriptBuilder opCode(OpCode opCode)
opCode - The OpCode to append.public ScriptBuilder appCall(byte[] scriptHash, java.lang.String operation, java.util.List<ContractParameter> params)
scriptHash - The script hash of the contract to call in big-endian order.operation - The operation to call.params - The parameters that will be used in the app call. Need to be in correct order.public ScriptBuilder appCall(byte[] scriptHash, java.util.List<ContractParameter> params)
scriptHash - The script hash of the contract to call in big-endian order.params - The parameters that will be used in the app call. Need to be in correct order.public ScriptBuilder appCall(byte[] scriptHash, java.lang.String operation)
scriptHash - The script hash of the contract to call in big-endian order.operation - The operation to call.public ScriptBuilder appCall(byte[] scriptHash)
scriptHash - The script hash of the contract to call in big-endian order.public ScriptBuilder tailCall(byte[] scriptHash)
scriptHash - The script hash of the contract to call in big-endian order.public ScriptBuilder sysCall(java.lang.String operation)
public ScriptBuilder pushParam(ContractParameter param)
public ScriptBuilder pushInteger(int v)
public ScriptBuilder pushInteger(java.math.BigInteger number)
public ScriptBuilder pushBoolean(boolean bool)
public ScriptBuilder pushData(java.lang.String data)
data - The data to add to the script.public ScriptBuilder pushData(byte[] data)
data - The data to add to the script.public ScriptBuilder pushDataLength(int length)
public ScriptBuilder pushArray(ContractParameter[] params)
public byte[] toArray()