Skip to main content

Token

Namespace: IotaSdk

public class Token : IToken, System.IDisposable

Inheritance ObjectToken
Implements IToken, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

Token(UInt64)

public Token(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

Balance()

The token's balance, in base units.

public ulong Balance()

Returns

UInt64

Id()

The object's ID.

public ObjectId Id()

Returns

ObjectId

TryFromBcs(Byte[])

Decode from BCS bytes, without validating the on-chain type tag.

public static Token TryFromBcs(Byte[] bytes)

Parameters

bytes Byte[]

Returns

Token

Exceptions

SdkFfiException

TryFromObjectWithType(Object, TypeTag)

Decode from an on-chain object, validating its Move type tag, including that its type parameter equals type_param.

public static Token TryFromObjectWithType(Object object, TypeTag typeParam)

Parameters

object Object

typeParam TypeTag

Returns

Token

Exceptions

SdkFfiException