Show / Hide Table of Contents

Class Common

Inheritance
object
Common
Namespace: Xrpl.Models.Transactions
Assembly: Xrpl.dll
Syntax
public class Common

Methods

| Edit this page View Source

IsAmount(object)

Verify the form and type of an Amount at runtime.

Declaration
public static bool IsAmount(object amount)
Parameters
Type Name Description
object amount

The object to check the form and type of.

Returns
Type Description
bool

Whether the Amount is malformed.

| Edit this page View Source

IsIssue(object)

Verify the form and type of an Issue at runtime.

Declaration
public static bool IsIssue(object input)
Parameters
Type Name Description
object input

The object to check the form and type of.

Returns
Type Description
bool

Whether the Issue is malformed.

| Edit this page View Source

IsIssuedCurrency(object)

Verify the form and type of an IssuedCurrencyAmount at runtime.

Declaration
public static bool IsIssuedCurrency(object input)
Parameters
Type Name Description
object input

The input to check the form and type of.

Returns
Type Description
bool

Whether the IssuedCurrencyAmount is malformed.

| Edit this page View Source

IsMemo(object)

Verify the form and type of Memo at runtime.

Declaration
public static bool IsMemo(object memo)
Parameters
Type Name Description
object memo

The object to check the form and type of.

Returns
Type Description
bool

Whether the Memo is malformed.

| Edit this page View Source

IsRecord(object)

Declaration
public static bool IsRecord(object value)
Parameters
Type Name Description
object value
Returns
Type Description
bool
| Edit this page View Source

IsSigner(object)

Verify the form and type of Signer at runtime.

Declaration
public static bool IsSigner(object signer)
Parameters
Type Name Description
object signer

The object to check the form and type of.

Returns
Type Description
bool

Whether the Signer is malformed.

| Edit this page View Source

IsUInt32(object)

True when the value is an integral number representable as UInt32. DictionaryObjectConverter materializes JSON numbers as int/long/ulong, so a uint-only type test rejects valid dictionary values.

Declaration
public static bool IsUInt32(object value)
Parameters
Type Name Description
object value
Returns
Type Description
bool
| Edit this page View Source

ParseAmountValue(object)

Parse the value of an amount, expressed either in XRP or as an Issued Currency, into a number.

Declaration
public static double ParseAmountValue(object amount)
Parameters
Type Name Description
object amount

An Amount to parse for its value.

Returns
Type Description
double
Exceptions
Type Condition
ValidationException

The parsed amount value, or null if the amount count not be parsed.

| Edit this page View Source

TryGetInt32(object, out int)

Extracts a signed Int32 from any integral representation produced by the JSON layer. Used by delta fields such as SponsorshipSet.RemainingOwnerCountDelta, which are serialized as the XRPL Int32 type and may be negative.

Declaration
public static bool TryGetInt32(object value, out int result)
Parameters
Type Name Description
object value
int result
Returns
Type Description
bool
| Edit this page View Source

TryGetUInt32(object, out uint)

Extracts a UInt32 from any integral representation produced by the JSON layer.

Declaration
public static bool TryGetUInt32(object value, out uint result)
Parameters
Type Name Description
object value
uint result
Returns
Type Description
bool
| Edit this page View Source

ValidateBaseTransaction(Dictionary<string, object>)

Verify the common fields of a transaction.
The validate functionality will be optional, and will check transaction form at runtime. This should be called any time a transaction will be verified.

Declaration
public static void ValidateBaseTransaction(Dictionary<string, object> tx)
Parameters
Type Name Description
Dictionary<string, object> tx

An interface w/ common transaction fields.

Exceptions
Type Condition
ValidationException

When the common param is malformed.

| Edit this page View Source

ValidateDomainId(string, string, bool)

Validates a DomainID value: a 64-character hex UInt256. On MPTokenIssuanceCreate a zero domain is temMALFORMED; on MPTokenIssuanceSet zero is legal (it clears the domain), so the zero check is opt-in via allowZero.

Declaration
public static void ValidateDomainId(string value, string txLabel, bool allowZero = false)
Parameters
Type Name Description
string value
string txLabel
bool allowZero
Exceptions
Type Condition
ValidationException

When the value is malformed.

| Edit this page View Source

ValidateNonZeroFlagsMask<TEnum>(uint, string)

Validates a flags value that must be non-zero and contain only bits defined by TEnum (rippled temINVALID_FLAG pattern).

Declaration
public static void ValidateNonZeroFlagsMask<TEnum>(uint value, string error) where TEnum : struct, Enum
Parameters
Type Name Description
uint value
string error
Type Parameters
Name Description
TEnum
Exceptions
Type Condition
ValidationException

When the value is zero or has bits outside the enum mask.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX