Class Issue
Represents an Issue (currency + optional issuer, or MPT issuance ID).
Supports XRP, IOU (currency+issuer), and MPT (mpt_issuance_id) formats.
Binary format:
XRP: 20 bytes (currency, all zeros)
IOU: 40 bytes (20 currency + 20 issuer)
MPT: 44 bytes (20 account + 20 noAccount marker + 4 sequence)
MPT binary layout matches rippled's STIssue serialization:
- 20 bytes: AccountID extracted from MPTokenIssuanceID
- 20 bytes: noAccount() = uint160{1} (19 zeros + 0x01)
- 4 bytes: token sequence (raw bytes from MPTID, effectively little-endian
due to rippled's memcpy+add32 pattern on LE platforms)
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class Issue : ISerializedType
Constructors
|
Edit this page
View Source
Issue()
XRP Issue: only currency, no issuer.
Declaration
|
Edit this page
View Source
Issue(Currency, AccountId)
IOU Issue: currency with specified issuer.
Declaration
public Issue(Currency currency, AccountId issuer)
Parameters
|
Edit this page
View Source
Issue(Hash192)
MPT Issue: identified by MPTokenIssuanceID.
Declaration
public Issue(Hash192 mptIssuanceId)
Parameters
| Type |
Name |
Description |
| Hash192 |
mptIssuanceId |
|
Fields
|
Edit this page
View Source
Currency
Declaration
public readonly Currency Currency
Field Value
|
Edit this page
View Source
Issuer
Declaration
public readonly AccountId Issuer
Field Value
|
Edit this page
View Source
MptIssuanceId
Declaration
public readonly Hash192 MptIssuanceId
Field Value
Properties
|
Edit this page
View Source
IsMpt
True if this issue represents an MPT.
Declaration
public bool IsMpt { get; }
Property Value
Methods
|
Edit this page
View Source
FromJson(JsonNode)
Deserialize from JSON, distinguishing XRP, IOU, and MPT issues.
Declaration
public static Issue FromJson(JsonNode token)
Parameters
| Type |
Name |
Description |
| JsonNode |
token |
|
Returns
|
Edit this page
View Source
FromParser(BinaryParser, int?)
Read from binary parser: supports XRP (20 bytes), IOU (40 bytes), and MPT (44 bytes).
Reads 20 bytes as "currency" (or account for MPT), then 20 bytes as "issuer".
If issuer == noAccount (uint160{1}), it's MPT: reads 4 more bytes as sequence.
Declaration
public static Issue FromParser(BinaryParser parser, int? hint = null)
Parameters
Returns
|
Edit this page
View Source
ToBytes(IBytesSink)
Declaration
public void ToBytes(IBytesSink sink)
Parameters
| Type |
Name |
Description |
| IBytesSink |
sink |
bytes Sink container
|
|
Edit this page
View Source
ToJson()
Get the JSON representation of this type
Declaration
Returns
| Type |
Description |
| JsonNode |
|
Implements
Extension Methods