Casper.Network.SDK
Show / Hide Table of Contents

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.

Inheritance
object
GlobalStateKey
URef
Implements
IPurseIdentifier
Inherited Members
GlobalStateKey.Key
GlobalStateKey.KeyIdentifier
GlobalStateKey.RawBytes
GlobalStateKey.ToHexString()
GlobalStateKey.FromString(string)
GlobalStateKey.FromBytes(byte[])
GlobalStateKey.Equals(object)
GlobalStateKey.GetHashCode()
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Casper.Network.SDK.Types
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
Type Name Description
byte[] rawBytes
AccessRights accessRights
| 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
Type Description
string

Properties

| Edit this page View Source

AccessRights

Declaration
public AccessRights AccessRights { get; }
Property Value
Type Description
AccessRights

Methods

| Edit this page View Source

GetBytes()

Declaration
public override byte[] GetBytes()
Returns
Type Description
byte[]
Overrides
GlobalStateKey.GetBytes()
| 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
Type Description
Dictionary<string, object>
| Edit this page View Source

ToString()

Converts a key object to a string with the right prefix

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
GlobalStateKey.ToString()
| Edit this page View Source

_GetRawBytesFromKey(string)

Declaration
protected override byte[] _GetRawBytesFromKey(string key)
Parameters
Type Name Description
string key
Returns
Type Description
byte[]
Overrides
GlobalStateKey._GetRawBytesFromKey(string)

Implements

IPurseIdentifier
  • Edit this page
  • View Source
In this article
Back to top Maintained by MAKE Technology LLC