Class GlobalStateKey
Base class for the different global state keys.
Inheritance
System.Object
GlobalStateKey
Assembly: Casper.Network.SDK.dll
Syntax
public abstract class GlobalStateKey : object
Constructors
GlobalStateKey(String)
Declaration
protected GlobalStateKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
GlobalStateKey(String, String)
Declaration
protected GlobalStateKey(string key, string keyPrefix)
Parameters
Type |
Name |
Description |
System.String |
key |
|
System.String |
keyPrefix |
|
Fields
Key
Declaration
protected readonly string Key
Field Value
Type |
Description |
System.String |
|
Properties
KeyIdentifier
Declaration
public KeyIdentifier KeyIdentifier { get; set; }
Property Value
RawBytes
Declaration
public byte[] RawBytes { get; }
Property Value
Type |
Description |
System.Byte[] |
|
Methods
_GetRawBytesFromKey(String)
Declaration
protected virtual byte[] _GetRawBytesFromKey(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Byte[] |
|
FromBytes(Byte[])
Converts a global state key from a byte array to its specific key object. First
byte in the array indicates the Key identifier.
Declaration
public static GlobalStateKey FromBytes(byte[] bytes)
Parameters
Type |
Name |
Description |
System.Byte[] |
bytes |
|
Returns
FromString(String)
Converts a global state key from string to its specific key object.
Declaration
public static GlobalStateKey FromString(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
|
Returns
GetBytes()
Declaration
public virtual byte[] GetBytes()
Returns
Type |
Description |
System.Byte[] |
|
ToHexString()
Declaration
public string ToHexString()
Returns
Type |
Description |
System.String |
|
ToString()
Converts a key object to a string with the right prefix
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|