Class GlobalStateKey
Base class for the different global state keys.
Inheritance
GlobalStateKey
Assembly: Casper.Network.SDK.dll
Syntax
public abstract class GlobalStateKey
Constructors
|
Edit this page
View Source
GlobalStateKey(string)
Declaration
protected GlobalStateKey(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
|
Edit this page
View Source
GlobalStateKey(string, string)
Declaration
protected GlobalStateKey(string key, string keyPrefix)
Parameters
Properties
|
Edit this page
View Source
Key
Declaration
protected string Key { get; init; }
Property Value
|
Edit this page
View Source
KeyIdentifier
Declaration
public KeyIdentifier KeyIdentifier { get; init; }
Property Value
|
Edit this page
View Source
RawBytes
Declaration
public byte[] RawBytes { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object.
|
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false.
|
Overrides
|
Edit this page
View Source
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 |
| byte[] |
bytes |
|
Returns
|
Edit this page
View Source
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 |
| string |
value |
|
Returns
|
Edit this page
View Source
GetBytes()
Declaration
public virtual byte[] GetBytes()
Returns
|
Edit this page
View Source
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object.
|
Overrides
|
Edit this page
View Source
ToHexString()
Returns a string with the hex string representation of the key, without the permissions byte.
Declaration
public string ToHexString()
Returns
|
Edit this page
View Source
ToString()
Converts a key object to a string with the right prefix
Declaration
public override string ToString()
Returns
Overrides
|
Edit this page
View Source
_GetRawBytesFromKey(string)
Declaration
protected virtual byte[] _GetRawBytesFromKey(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns