Class CLValue
The type used in deploy input arguments. And it can also be returned as a
result of a query to the network or a contract call.
Assembly: Casper.Network.SDK.dll
Syntax
Constructors
|
Edit this page
View Source
CLValue(byte[], CLType)
Declaration
public CLValue(byte[] bytes, CLType clType)
Parameters
|
Edit this page
View Source
CLValue(byte[], CLType, object)
Declaration
public CLValue(byte[] bytes, CLType clType, object parsed)
Parameters
|
Edit this page
View Source
CLValue(byte[], CLTypeInfo)
Declaration
public CLValue(byte[] bytes, CLTypeInfo clType)
Parameters
|
Edit this page
View Source
CLValue(byte[], CLTypeInfo, object)
Declaration
[JsonConstructor]
public CLValue(byte[] bytes, CLTypeInfo typeInfo, object parsed)
Parameters
|
Edit this page
View Source
CLValue(string, CLTypeInfo, object)
Declaration
public CLValue(string hexBytes, CLTypeInfo clType, object parsed)
Parameters
Properties
|
Edit this page
View Source
Bytes
Byte array representation of underlying data
Declaration
[JsonPropertyName("bytes")]
[JsonConverter(typeof(HexBytesConverter))]
public byte[] Bytes { get; }
Property Value
|
Edit this page
View Source
Parsed
The optional parsed value of the bytes used when testing
Declaration
[JsonPropertyName("parsed")]
public object Parsed { get; }
Property Value
|
Edit this page
View Source
TypeInfo
Type of the value. Can be simple or constructed
Declaration
[JsonPropertyName("cl_type")]
[JsonConverter(typeof(CLTypeInfoConverter))]
public CLTypeInfo TypeInfo { get; }
Property Value
Methods
|
Edit this page
View Source
Bool(bool)
Returns a CLValue object with a boolean type.
Declaration
public static CLValue Bool(bool value)
Parameters
| Type |
Name |
Description |
| bool |
value |
|
Returns
|
Edit this page
View Source
ByteArray(byte[])
Returns a CLValue object with a ByteArray type.
Declaration
public static CLValue ByteArray(byte[] bytes)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
ByteArray(string)
Returns a CLValue object with a ByteArray type.
Declaration
public static CLValue ByteArray(string hex)
Parameters
| Type |
Name |
Description |
| string |
hex |
|
Returns
|
Edit this page
View Source
EmptyList(CLTypeInfo)
Returns a CLValue object with an empty list for a defined type.
Declaration
public static CLValue EmptyList(CLTypeInfo innerTypeInfo)
Parameters
Returns
|
Edit this page
View Source
EmptyMap(CLTypeInfo, CLTypeInfo)
Returns a CLValue object with an empty map for a defined key/value types.
Declaration
public static CLValue EmptyMap(CLTypeInfo keyTypeInfo, CLTypeInfo valueTypeInfo)
Parameters
Returns
|
Edit this page
View Source
Err(CLValue, CLTypeInfo)
Returns a Result CLValue with wrapped Err value inside.
To be complete, it must be indicated the type for an ok value
Declaration
public static CLValue Err(CLValue err, CLTypeInfo okTypeInfo)
Parameters
Returns
|
Edit this page
View Source
I32(int)
Returns a CLValue object with an Int32 type.
Declaration
public static CLValue I32(int value)
Parameters
| Type |
Name |
Description |
| int |
value |
|
Returns
|
Edit this page
View Source
I64(long)
Returns a CLValue object with an Int64 type.
Declaration
public static CLValue I64(long value)
Parameters
| Type |
Name |
Description |
| long |
value |
|
Returns
|
Edit this page
View Source
IsNone()
Returns trueif the object has Option type with None value. False otherwise.
Declaration
Returns
|
Edit this page
View Source
IsSome()
Returns trueif the object has Option type with Some value. False otherwise.
Declaration
Returns
|
Edit this page
View Source
Key(GlobalStateKey)
Returns a CLValue object with a GlobalStateKey in it
Declaration
public static CLValue Key(GlobalStateKey key)
Parameters
Returns
|
Edit this page
View Source
KeyFromPublicKey(PublicKey)
Converts a public key into an account hash an returns it wrapped into a Key CLValue
Declaration
public static CLValue KeyFromPublicKey(PublicKey publicKey)
Parameters
Returns
|
Edit this page
View Source
List(CLValue[])
Returns a List CLValue object.
Declaration
public static CLValue List(CLValue[] values)
Parameters
| Type |
Name |
Description |
| CLValue[] |
values |
|
Returns
|
Edit this page
View Source
Map(Dictionary<CLValue, CLValue>)
Returns a Map CLValue object.
Declaration
public static CLValue Map(Dictionary<CLValue, CLValue> dict)
Parameters
Returns
|
Edit this page
View Source
Ok(CLValue, CLTypeInfo)
Returns a Result CLValue with wrapped OK value inside.
To be complete, it must be indicated the type for an err value
Declaration
public static CLValue Ok(CLValue ok, CLTypeInfo errTypeInfo)
Parameters
Returns
|
Edit this page
View Source
Option(CLValue)
Wraps a CLValue object into an Option CLValue.
Declaration
public static CLValue Option(CLValue innerValue)
Parameters
| Type |
Name |
Description |
| CLValue |
innerValue |
|
Returns
|
Edit this page
View Source
Option(CLValue[])
Declaration
public static CLValue Option(CLValue[] innerValue)
Parameters
| Type |
Name |
Description |
| CLValue[] |
innerValue |
|
Returns
|
Edit this page
View Source
Option(GlobalStateKey)
Declaration
public static CLValue Option(GlobalStateKey innerValue)
Parameters
Returns
|
Edit this page
View Source
Option(PublicKey)
Declaration
public static CLValue Option(PublicKey innerValue)
Parameters
Returns
|
Edit this page
View Source
Option(URef)
Declaration
public static CLValue Option(URef innerValue)
Parameters
| Type |
Name |
Description |
| URef |
innerValue |
|
Returns
|
Edit this page
View Source
Option(byte)
Declaration
public static CLValue Option(byte innerValue)
Parameters
| Type |
Name |
Description |
| byte |
innerValue |
|
Returns
|
Edit this page
View Source
Option(byte[])
Declaration
public static CLValue Option(byte[] innerValue)
Parameters
| Type |
Name |
Description |
| byte[] |
innerValue |
|
Returns
|
Edit this page
View Source
Option(Dictionary<CLValue, CLValue>)
Declaration
public static CLValue Option(Dictionary<CLValue, CLValue> innerValue)
Parameters
Returns
|
Edit this page
View Source
Option(int)
Declaration
public static CLValue Option(int innerValue)
Parameters
| Type |
Name |
Description |
| int |
innerValue |
|
Returns
|
Edit this page
View Source
Option(long)
Declaration
public static CLValue Option(long innerValue)
Parameters
| Type |
Name |
Description |
| long |
innerValue |
|
Returns
|
Edit this page
View Source
Option(string)
Declaration
public static CLValue Option(string innerValue)
Parameters
| Type |
Name |
Description |
| string |
innerValue |
|
Returns
|
Edit this page
View Source
Option(uint)
Declaration
public static CLValue Option(uint innerValue)
Parameters
| Type |
Name |
Description |
| uint |
innerValue |
|
Returns
|
Edit this page
View Source
Option(ulong)
Declaration
public static CLValue Option(ulong innerValue)
Parameters
| Type |
Name |
Description |
| ulong |
innerValue |
|
Returns
|
Edit this page
View Source
OptionNone(CLTypeInfo)
Declaration
public static CLValue OptionNone(CLTypeInfo innerTypeInfo)
Parameters
Returns
|
Edit this page
View Source
PublicKey(PublicKey)
Returns a CLValue object with a PublicKey type.
Declaration
public static CLValue PublicKey(PublicKey publicKey)
Parameters
Returns
|
Edit this page
View Source
PublicKey(byte[], KeyAlgo)
Returns a CLValue object with a PublicKey type.
Declaration
public static CLValue PublicKey(byte[] value, KeyAlgo keyAlgorithm)
Parameters
| Type |
Name |
Description |
| byte[] |
value |
|
| KeyAlgo |
keyAlgorithm |
|
Returns
|
Edit this page
View Source
Some(out object)
Unwraps the value in an Option object with Some value.
Declaration
public bool Some(out object value)
Parameters
| Type |
Name |
Description |
| object |
value |
A .NET object unwrapped from Option.Some().
|
Returns
| Type |
Description |
| bool |
True if a value has been unwrapped. False otherwise.
|
|
Edit this page
View Source
Some<T>(out T)
Unwraps the value in an Option object with Some value.
Declaration
public bool Some<T>(out T value)
Parameters
| Type |
Name |
Description |
| T |
value |
An object with type T unwrapped from Option.Some().
|
Returns
| Type |
Description |
| bool |
True if a value has been unwrapped. False otherwise.
|
Type Parameters
|
Edit this page
View Source
String(string)
Returns a CLValue object with a String type.
Declaration
public static CLValue String(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
|
Edit this page
View Source
ToBigInteger()
Converts a CLValueto a BigInteger
Declaration
public BigInteger ToBigInteger()
Returns
|
Edit this page
View Source
ToBoolean()
Converts a CLValueto a boolean
Declaration
Returns
|
Edit this page
View Source
ToByte()
Converts a CLValueto a U8/byte
Declaration
Returns
|
Edit this page
View Source
ToByteArray()
Converts ByteArray CLValue to a byte[]
Declaration
public byte[] ToByteArray()
Returns
|
Edit this page
View Source
ToDictionary()
Converts Map CLValue to Dictionary<CLValue,CLValue>.
Declaration
public IDictionary ToDictionary()
Returns
|
Edit this page
View Source
ToDictionary<TKey, TValue>()
Converts Map CLValue to Dictionary<TKey,TValue>.
Declaration
public Dictionary<TKey, TValue> ToDictionary<TKey, TValue>()
Returns
Type Parameters
| Name |
Description |
| TKey |
|
| TValue |
|
|
Edit this page
View Source
ToGlobalStateKey()
Converts a CLValue to a GlobalStateKey
Declaration
public GlobalStateKey ToGlobalStateKey()
Returns
|
Edit this page
View Source
ToInt32()
Converts a CLValueto a Int32
Declaration
Returns
|
Edit this page
View Source
ToInt64()
Converts a CLValueto a Int64
Declaration
Returns
|
Edit this page
View Source
ToList()
Converts a List CLValue to a List<>.
Declaration
Returns
|
Edit this page
View Source
ToList<T>()
Converts a List CLValue to a List<T>.
Declaration
public List<T> ToList<T>()
Returns
Type Parameters
|
Edit this page
View Source
ToPublicKey()
Converts a CLValueto a PublicKey
Declaration
public PublicKey ToPublicKey()
Returns
|
Edit this page
View Source
ToResult<TOk, TErr>()
Converts Result CLValue to Result<TOk,TErr>.
Declaration
public Result<TOk, TErr> ToResult<TOk, TErr>()
Returns
| Type |
Description |
| Result<TOk, TErr> |
|
Type Parameters
| Name |
Description |
| TOk |
|
| TErr |
|
|
Edit this page
View Source
ToString()
Converts a CLValueto a String
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
ToTuple1<T1>()
Converts Tuple1 CLValue to Tuple<T1>.
Declaration
public Tuple<T1> ToTuple1<T1>()
Returns
| Type |
Description |
| Tuple<T1> |
|
Type Parameters
|
Edit this page
View Source
ToTuple2<T1, T2>()
Converts Tuple2 CLValue to Tuple<T1,T2>.
Declaration
public Tuple<T1, T2> ToTuple2<T1, T2>()
Returns
| Type |
Description |
| Tuple<T1, T2> |
|
Type Parameters
|
Edit this page
View Source
ToTuple3<T1, T2, T3>()
Converts Tuple2 CLValue to Tuple<T1,T2,T3>.
Declaration
public Tuple<T1, T2, T3> ToTuple3<T1, T2, T3>()
Returns
| Type |
Description |
| Tuple<T1, T2, T3> |
|
Type Parameters
| Name |
Description |
| T1 |
|
| T2 |
|
| T3 |
|
|
Edit this page
View Source
ToUInt32()
Converts a CLValueto a UInt32
Declaration
Returns
|
Edit this page
View Source
ToUInt64()
Converts a CLValueto a UInt64
Declaration
Returns
|
Edit this page
View Source
ToURef()
Converts a CLValueto a URef
Declaration
Returns
|
Edit this page
View Source
ToUnit()
Converts Unit CLValue to Unit.
Declaration
Returns
|
Edit this page
View Source
Tuple1(CLValue)
Returns a Tuple1 CLValue object.
Declaration
public static CLValue Tuple1(CLValue t0)
Parameters
Returns
|
Edit this page
View Source
Tuple2(CLValue, CLValue)
Returns a Tuple2 CLValue object.
Declaration
public static CLValue Tuple2(CLValue t0, CLValue t1)
Parameters
Returns
|
Edit this page
View Source
Tuple3(CLValue, CLValue, CLValue)
Returns a Tuple3 CLValue object.
Declaration
public static CLValue Tuple3(CLValue t0, CLValue t1, CLValue t2)
Parameters
Returns
|
Edit this page
View Source
U128(BigInteger)
Returns a CLValue object with an U128 type.
Declaration
public static CLValue U128(BigInteger value)
Parameters
Returns
|
Edit this page
View Source
U256(BigInteger)
Returns a CLValue object with an U256 type.
Declaration
public static CLValue U256(BigInteger value)
Parameters
Returns
|
Edit this page
View Source
U32(uint)
Returns a CLValue object with an UInt32 type.
Declaration
public static CLValue U32(uint value)
Parameters
| Type |
Name |
Description |
| uint |
value |
|
Returns
|
Edit this page
View Source
U512(BigInteger)
Returns a CLValue object with an U512 type.
Declaration
public static CLValue U512(BigInteger value)
Parameters
Returns
|
Edit this page
View Source
U512(ulong)
Returns a CLValue object with an U512 type.
Declaration
public static CLValue U512(ulong value)
Parameters
| Type |
Name |
Description |
| ulong |
value |
|
Returns
|
Edit this page
View Source
U64(ulong)
Returns a CLValue object with an UInt64 type.
Declaration
public static CLValue U64(ulong value)
Parameters
| Type |
Name |
Description |
| ulong |
value |
|
Returns
|
Edit this page
View Source
U8(byte)
Returns a CLValue object with an U8/byte type.
Declaration
public static CLValue U8(byte value)
Parameters
| Type |
Name |
Description |
| byte |
value |
|
Returns
|
Edit this page
View Source
URef(URef)
Returns a CLValue object with a URef type.
Declaration
public static CLValue URef(URef value)
Parameters
| Type |
Name |
Description |
| URef |
value |
|
Returns
|
Edit this page
View Source
URef(string)
Returns a CLValue object with a URef type.
Declaration
public static CLValue URef(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
|
Edit this page
View Source
Unit()
Returns a CLValue object with a Unit type.
Declaration
public static CLValue Unit()
Returns
Operators
|
Edit this page
View Source
explicit operator GlobalStateKey(CLValue)
Declaration
public static explicit operator GlobalStateKey(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator PublicKey(CLValue)
Declaration
public static explicit operator PublicKey(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator URef(CLValue)
Declaration
public static explicit operator URef(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator Unit(CLValue)
Declaration
public static explicit operator Unit(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator bool(CLValue)
Declaration
public static explicit operator bool(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator byte(CLValue)
Declaration
public static explicit operator byte(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator byte[](CLValue)
Declaration
public static explicit operator byte[](CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator int(CLValue)
Declaration
public static explicit operator int(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator long(CLValue)
Declaration
public static explicit operator long(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator BigInteger(CLValue)
Declaration
public static explicit operator BigInteger(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator string(CLValue)
Declaration
public static explicit operator string(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator uint(CLValue)
Declaration
public static explicit operator uint(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
explicit operator ulong(CLValue)
Declaration
public static explicit operator ulong(CLValue clValue)
Parameters
| Type |
Name |
Description |
| CLValue |
clValue |
|
Returns
|
Edit this page
View Source
implicit operator CLValue(string)
Declaration
public static implicit operator CLValue(string s)
Parameters
| Type |
Name |
Description |
| string |
s |
|
Returns