Table of Contents

Class Utilities

Namespace
Aptos.Core
Assembly
Aptos.dll
public static class Utilities
Inheritance
Utilities
Inherited Members

Methods

DeserializeJObjectOrString(string)

public static dynamic? DeserializeJObjectOrString(string value)

Parameters

value string

Returns

dynamic

FindFirstNonSignerIndex(MoveFunction)

public static int FindFirstNonSignerIndex(MoveFunction function)

Parameters

function MoveFunction

Returns

int

FloorToWholeHour(long)

public static long FloorToWholeHour(long timestampInSeconds)

Parameters

timestampInSeconds long

Returns

long

HexStringToBytes(string)

public static byte[] HexStringToBytes(string hexString)

Parameters

hexString string

Returns

byte[]

HexStringToString(string)

public static string HexStringToString(string hexString)

Parameters

hexString string

Returns

string

ParseFunctionParts(string)

Parses a function string into its module address, module name, and function name.

public static (string moduleAddress, string moduleName, string functionName) ParseFunctionParts(string function)

Parameters

function string

An function split by "::". E.g. "0x1::aptos_account::transfer_coins"

Returns

(string moduleAddress, string moduleName, string functionName)

A tuple containing the module address, module name, and function name.

Exceptions

ArgumentException

If the function string is not in the correct format.

StandardizeTypeTags(List<object>)

public static List<TypeTag> StandardizeTypeTags(List<object> typeTags)

Parameters

typeTags List<object>

Returns

List<TypeTag>

UnwrapOption<T>(object)

public static T? UnwrapOption<T>(object val) where T : class

Parameters

val object

Returns

T

Type Parameters

T