Class URef
Unforgeable Reference. This key type is used for storing any type of value
except Account. Additionally, URefs used in contracts carry permission information
to prevent unauthorized usage of the value stored under the key.
Assembly: Casper.Network.SDK.dll
Syntax
public class URef : GlobalStateKey, IPurseIdentifier
Constructors
|
Edit this page
View Source
URef(byte[])
Creates an URef from a 33 bytes array. Last byte corresponds to the access rights.
Declaration
public URef(byte[] bytes)
Parameters
| Type |
Name |
Description |
| byte[] |
bytes |
|
|
Edit this page
View Source
URef(byte[], AccessRights)
Creates an URef from a 32 bytes array and the access rights.
Declaration
public URef(byte[] rawBytes, AccessRights accessRights)
Parameters
|
Edit this page
View Source
URef(string)
Declaration
public URef(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Fields
|
Edit this page
View Source
KEYPREFIX
Declaration
public static string KEYPREFIX
Field Value
Properties
|
Edit this page
View Source
AccessRights
Declaration
public AccessRights AccessRights { get; }
Property Value
Methods
|
Edit this page
View Source
GetBytes()
Declaration
public override byte[] GetBytes()
Returns
Overrides
|
Edit this page
View Source
GetPurseIdentifier()
Returns a PurseIdentifier object as defined in the RPC schema for an URef key.
Declaration
public Dictionary<string, object> GetPurseIdentifier()
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 override byte[] _GetRawBytesFromKey(string key)
Parameters
| Type |
Name |
Description |
| string |
key |
|
Returns
Overrides
Implements