Table of Contents

Class Extensions

Namespace
chia.dotnet
Assembly
chia-dotnet.dll

Helper extension methods

public static class Extensions
Inheritance
Extensions
Inherited Members

Fields

OneTrillion

There are 1 trillion mojo in a chia

public const decimal OneTrillion = 1000000000000

Field Value

decimal
Helper extension methods

Methods

AsChia(ulong)

Formats a value expressed in mojo to chia

public static string AsChia(this ulong mojo)

Parameters

mojo ulong

The amount of mojo

Returns

string

Formatted string expressed in a unit of chia

AsChia(ulong, IFormatProvider?)

Formats a value expressed in mojo to chia

public static string AsChia(this ulong mojo, IFormatProvider? provider)

Parameters

mojo ulong

The amount of mojo

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

string

Formatted string expressed in a unit of chia

AsChia(ulong, string?)

Formats a value expressed in mojo to chia

public static string AsChia(this ulong mojo, string? format)

Parameters

mojo ulong

The amount of mojo

format string

A numeric format string.

Returns

string

Formatted string expressed in a unit of chia

AsChia(ulong, string?, IFormatProvider?)

Formats a value expressed in mojo to chia

public static string AsChia(this ulong mojo, string? format, IFormatProvider? provider)

Parameters

mojo ulong

The amount of mojo

format string

A numeric format string.

provider IFormatProvider

An object that supplies culture-specific formatting information.

Returns

string

Formatted string expressed in a unit of chia

ToBytesString(double, string)

Format a number of bytes in human readable format

public static string ToBytesString(this double byteCount, string format = "N3")

Parameters

byteCount double

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

ToBytesString(int, string)

Format a number of bytes in human readable format

public static string ToBytesString(this int byteCount, string format = "N3")

Parameters

byteCount int

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

ToBytesString(long, string)

Format a number of bytes in human readable format

public static string ToBytesString(this long byteCount, string format = "N3")

Parameters

byteCount long

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

ToBytesString(BigInteger, string)

Format a number of bytes in human readable format

public static string ToBytesString(this BigInteger byteCount, string format = "N3")

Parameters

byteCount BigInteger

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

Remarks

ToBytesString(UInt128, string)

Format a number of bytes in human readable format

public static string ToBytesString(this UInt128 byteCount, string format = "N3")

Parameters

byteCount UInt128

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

Remarks

ToBytesString(uint, string)

Format a number of bytes in human readable format

public static string ToBytesString(this uint byteCount, string format = "N3")

Parameters

byteCount uint

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

ToBytesString(ulong, string)

Format a number of bytes in human readable format

public static string ToBytesString(this ulong byteCount, string format = "N3")

Parameters

byteCount ulong

The number of bytes

format string

Return string culture format

Returns

string

A human readable string

Remarks

ToChia(ulong)

B Converts an amount of mojo to the same amount in chia, converting from ulong to decimal

public static decimal ToChia(this ulong mojo)

Parameters

mojo ulong

The amount of mojo

Returns

decimal

The amount of chia

ToMojo(decimal)

Converts an amount of chia to the same amount in mojo, converting from decimal to ulong

public static ulong ToMojo(this decimal chia)

Parameters

chia decimal

The amount of chia

Returns

ulong

The amount of mojo