public class ScriptBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ScriptBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ScriptBuilder |
appCall(byte[] scriptHash)
Deprecated.
User
appCall(ScriptHash) instead. |
ScriptBuilder |
appCall(byte[] scriptHash,
java.util.List<ContractParameter> params)
Deprecated.
User
appCall(ScriptHash, List) instead. |
ScriptBuilder |
appCall(byte[] scriptHash,
java.lang.String operation)
Deprecated.
User
appCall(ScriptHash, String) instead. |
ScriptBuilder |
appCall(byte[] scriptHash,
java.lang.String operation,
java.util.List<ContractParameter> params)
Deprecated.
User
appCall(ScriptHash, String, List) instead. |
ScriptBuilder |
appCall(ScriptHash 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)
Deprecated.
User
tailCall(ScriptHash) instead. |
ScriptBuilder |
tailCall(ScriptHash scriptHash)
Appends a tail call to the script.
|
byte[] |
toArray() |
public ScriptBuilder opCode(OpCode opCode)
opCode - The OpCode to append.public ScriptBuilder appCall(ScriptHash scriptHash, java.lang.String operation, java.util.List<ContractParameter> params)
scriptHash - The script hash of the contract to call.operation - The operation to call.params - The parameters that will be used in the app call. Need to be in correct order.@Deprecated public ScriptBuilder appCall(byte[] scriptHash, java.lang.String operation, java.util.List<ContractParameter> params)
appCall(ScriptHash, String, List) instead.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.@Deprecated public ScriptBuilder appCall(byte[] scriptHash, java.util.List<ContractParameter> params)
appCall(ScriptHash, List) instead.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.@Deprecated public ScriptBuilder appCall(byte[] scriptHash, java.lang.String operation)
appCall(ScriptHash, String) instead.scriptHash - The script hash of the contract to call in big-endian order.operation - The operation to call.@Deprecated public ScriptBuilder appCall(byte[] scriptHash)
appCall(ScriptHash) instead.scriptHash - The script hash of the contract to call in big-endian order.@Deprecated public ScriptBuilder tailCall(byte[] scriptHash)
tailCall(ScriptHash) instead.scriptHash - The script hash of the contract to call in big-endian order.public ScriptBuilder tailCall(ScriptHash scriptHash)
scriptHash - The script hash of the contract to call.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()