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 |
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 value)
Creates a byte array parameter from the given hex string.
|
boolean |
equals(java.lang.Object o) |
static ContractParameter |
fixed8ByteArray(java.math.BigDecimal number)
Creates a byte array parameter from the given number, transforming it to the Fixed8 number
format in little-endian order.
|
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 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)
Creates a byte array parameter from the given value.
Make sure that the array is already in the right order. E.g. Fixed8 numbers need to be in little-endian order. It will be sent in the order provided.
byteArray - The parameter value.public static ContractParameter byteArray(java.lang.String value)
Creates a byte array parameter from the given hex string.
Make sure that the value is already in the right order. E.g. Fixed8 numbers need to be in little-endian order. It will be sent in the order provided.
value - The value as a string.public static ContractParameter fixed8ByteArray(java.math.BigDecimal number)
number - A decimal numberpublic 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