public class ContractParameter
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ContractParameter.ContractParameterDeserializer |
protected static class |
ContractParameter.ContractParameterSerializer |
protected static class |
ContractParameter.ParameterDeserializer<T extends ContractParameter> |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
value |
| Modifier | Constructor and Description |
|---|---|
protected |
ContractParameter() |
protected |
ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType) |
|
ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType,
java.lang.Object value) |
| Modifier and Type | Method and Description |
|---|---|
static ContractParameter |
any(java.lang.Object value) |
static ContractParameter |
array(ContractParameter... params) |
static ContractParameter |
array(java.util.List<ContractParameter> params) |
static ContractParameter |
bool(boolean bool)
Creates a boolean parameter from the given boolean.
|
static ContractParameter |
byteArray(byte[] byteArray)
Creates a byte array parameter from the given value.
|
static ContractParameter |
byteArray(java.lang.String hexString)
Creates a byte array parameter from the given hex string.
|
static ContractParameter |
byteArrayFromString(java.lang.String value)
Create a byte array parameter from a string by converting the string to bytes using the UTF-8
character set.
|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getParamName() |
io.neow3j.model.types.ContractParameterType |
getParamType() |
java.lang.Object |
getValue() |
static ContractParameter |
hash160(ScriptHash hash)
Creates a hash160 parameter from the given script hash.
|
static ContractParameter |
hash256(byte[] hash)
Creates a hash256 parameter from the given bytes.
|
static ContractParameter |
hash256(java.lang.String hashHexString)
Creates a hash256 parameter from the given hex string.
|
int |
hashCode() |
static ContractParameter |
integer(java.math.BigInteger integer)
Creates an integer parameter from the given integer.
|
static ContractParameter |
integer(int integer)
Creates an integer parameter from the given integer.
|
static ContractParameter |
publicKey(byte[] publicKey)
Creates a public key parameter from the given public key bytes.
|
static ContractParameter |
signature(byte[] signature)
Creates a signature parameter from the given signature.
|
static ContractParameter |
signature(java.lang.String signatureHexString)
Creates a signature parameter from the given signature hexadecimal string.
|
static ContractParameter |
string(java.lang.String value) |
protected ContractParameter()
public ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType,
java.lang.Object value)
protected ContractParameter(java.lang.String name,
io.neow3j.model.types.ContractParameterType paramType)
public static ContractParameter any(java.lang.Object value)
public static ContractParameter string(java.lang.String value)
public static ContractParameter array(java.util.List<ContractParameter> params)
public static ContractParameter array(ContractParameter... params)
public static ContractParameter byteArray(byte[] byteArray)
Make sure that the array is in the right byte order, i.e., endianness.
byteArray - The parameter value.public static ContractParameter byteArray(java.lang.String hexString)
hexString - The hexadecimal string.public static ContractParameter byteArrayFromString(java.lang.String value)
value - The parameter value.public static ContractParameter signature(java.lang.String signatureHexString)
signatureHexString - A signature as hexadecimal string.public static ContractParameter signature(byte[] signature)
signature - A signature.public static ContractParameter bool(boolean bool)
bool - a boolean value.public static ContractParameter integer(int integer)
integer - an integer value.public static ContractParameter integer(java.math.BigInteger integer)
integer - an integer value.public static ContractParameter hash160(ScriptHash hash)
hash - a script hashpublic static ContractParameter hash256(java.lang.String hashHexString)
hashHexString - hex string (possibly a 256-bit hash) in little-endian order.public static ContractParameter hash256(byte[] hash)
hash - bytes (possibly a 256-bit hash) in little-endian order.public static ContractParameter publicKey(byte[] publicKey)
The public key must be encoded in compressed format as described in section 2.3.3 of SEC1.
publicKey - The public key to use in the parameter.public java.lang.String getParamName()
public io.neow3j.model.types.ContractParameterType getParamType()
public java.lang.Object getValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object