Class StObject
Class for Serializing/Deserializing objects
Inheritance
Implements
Namespace: Xrpl.BinaryCodec.Types
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class StObject : ISerializedType
Constructors
| Edit this page View SourceStObject()
Construct a STObject from a JSON object
Declaration
public StObject()
Fields
| Edit this page View SourceFields
Declaration
public SortedDictionary<Field, ISerializedType> Fields
Field Value
| Type | Description |
|---|---|
| SortedDictionary<Field, ISerializedType> |
Properties
| Edit this page View Sourcethis[AccountIdField]
add AccountIdField field to this object
Declaration
public AccountId this[AccountIdField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| AccountIdField | f | AccountIdFieldfield |
Property Value
| Type | Description |
|---|---|
| AccountId |
this[AmountField]
add AmountField field to this object
Declaration
public Amount this[AmountField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| AmountField | f | AmountFieldfield |
Property Value
| Type | Description |
|---|---|
| Amount |
this[BlobField]
add BlobField field to this object
Declaration
public Blob this[BlobField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| BlobField | f | BlobFieldfield |
Property Value
| Type | Description |
|---|---|
| Blob |
this[EngineResultField]
add EngineResultField field to this object
Declaration
public EngineResult this[EngineResultField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| EngineResultField | f | EngineResultFieldfield |
Property Value
| Type | Description |
|---|---|
| EngineResult |
this[Hash128Field]
add Hash128Field field to this object
Declaration
public Hash128 this[Hash128Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash128Field | f | Hash128Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash128 |
this[Hash160Field]
add Hash160Field field to this object
Declaration
public Hash160 this[Hash160Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash160Field | f | Hash160Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash160 |
this[Hash192Field]
add Hash192Field field to this object
Declaration
public Hash192 this[Hash192Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash192Field | f | Hash192Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash192 |
this[Hash256Field]
add Hash256Field field to this object
Declaration
public Hash256 this[Hash256Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash256Field | f | Hash256Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash256 |
this[LedgerEntryTypeField]
add LedgerEntryTypeField field to this object
Declaration
public LedgerEntryType this[LedgerEntryTypeField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| LedgerEntryTypeField | f | LedgerEntryTypeFieldfield |
Property Value
| Type | Description |
|---|---|
| LedgerEntryType |
this[PathSetField]
add PathSetField field to this object
Declaration
public PathSet this[PathSetField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| PathSetField | f | PathSetFieldfield |
Property Value
| Type | Description |
|---|---|
| PathSet |
this[StArrayField]
add StArrayField field to this object
Declaration
public StArray this[StArrayField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| StArrayField | f | StArrayFieldfield |
Property Value
| Type | Description |
|---|---|
| StArray |
this[StObjectField]
add StObjectField field to this object
Declaration
public StObject this[StObjectField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| StObjectField | f | StObjectFieldfield |
Property Value
| Type | Description |
|---|---|
| StObject |
this[TransactionTypeField]
add TransactionTypeField field to this object
Declaration
public TransactionType this[TransactionTypeField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| TransactionTypeField | f | TransactionTypeFieldfield |
Property Value
| Type | Description |
|---|---|
| TransactionType |
this[Uint16Field]
add Uint16Field field to this object
Declaration
public Uint16 this[Uint16Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint16Field | f | Uint16Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint16 |
this[Uint32Field]
add Uint32Field field to this object
Declaration
public Uint32 this[Uint32Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint32Field | f | Uint32Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint32 |
this[Uint64Field]
add Uint64Field field to this object
Declaration
public Uint64 this[Uint64Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint64Field | f | Uint64Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint64 |
this[Uint8Field]
add Uint8Field field to this object
Declaration
public Uint8 this[Uint8Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint8Field | f | Uint8Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint8 |
this[Vector256Field]
add Vector256Field field to this object
Declaration
public Vector256 this[Vector256Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Vector256Field | f | Vector256Fieldfield |
Property Value
| Type | Description |
|---|---|
| Vector256 |
Methods
| Edit this page View SourceFromHex(string)
Construct a STObject from a hex string
Declaration
public static StObject FromHex(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| string | s | hex string |
Returns
| Type | Description |
|---|---|
| StObject |
FromJson(JsonNode)
Construct a STObject from a JSON object
Declaration
public static StObject FromJson(JsonNode token)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonNode | token | An object to include |
Returns
| Type | Description |
|---|---|
| StObject |
FromJson(JsonNode, bool)
Construct a STObject from a JSON object
Declaration
public static StObject FromJson(JsonNode token, bool signingOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonNode | token | An object to include |
| bool | signingOnly |
Returns
| Type | Description |
|---|---|
| StObject |
Exceptions
| Type | Condition |
|---|---|
| InvalidJsonException | unknown field or token is not an object |
FromParser(BinaryParser, int?)
Construct a STObject from a BinaryParser
Declaration
public static StObject FromParser(BinaryParser parser, int? hint = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryParser | parser | BinaryParser to read STObject from |
| int? | hint |
Returns
| Type | Description |
|---|---|
| StObject |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | has field as null |
Has(Field)
check that object contains field
Declaration
public bool Has(Field field)
Parameters
| Type | Name | Description |
|---|---|---|
| Field | field | field |
Returns
| Type | Description |
|---|---|
| bool |
SetFlag(uint)
Set flag to this object
Declaration
public StObject SetFlag(uint flags)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | flags | flag |
Returns
| Type | Description |
|---|---|
| StObject |
SigningData()
Signing this data
Declaration
public byte[] SigningData()
Returns
| Type | Description |
|---|---|
| byte[] |
ToBytes()
this object to bytes array
Declaration
public byte[] ToBytes()
Returns
| Type | Description |
|---|---|
| byte[] |
ToBytes(IBytesSink)
to bytes Sink
Declaration
public void ToBytes(IBytesSink to)
Parameters
| Type | Name | Description |
|---|---|---|
| IBytesSink | to |
ToBytes(IBytesSink, Func<Field, bool>)
to bytes Sink
Declaration
public void ToBytes(IBytesSink to, Func<Field, bool> p)
Parameters
| Type | Name | Description |
|---|---|---|
| IBytesSink | to | bytes Sink container |
| Func<Field, bool> | p | field selector |
ToJson()
Get the JSON representation of this type
Declaration
public JsonNode ToJson()
Returns
| Type | Description |
|---|---|
| JsonNode |
ToJsonObject()
Get the JSON interpretation of this.bytes
Declaration
public JsonObject ToJsonObject()
Returns
| Type | Description |
|---|---|
| JsonObject |
Operators
| Edit this page View Sourceimplicit operator StObject(JsonNode)
Construct a STObject from a JSON object
Declaration
public static implicit operator StObject(JsonNode token)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonNode | token | An object to include |
Returns
| Type | Description |
|---|---|
| StObject |