Skip to content

Commit 0909a9c

Browse files
Added XrplTrustSetFlags to XrplTrustSetTransaction (#14)
1 parent f4d60b6 commit 0909a9c

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
3+
namespace XUMM.NET.SDK.Enums;
4+
5+
[Flags]
6+
public enum XrplTrustSetFlags
7+
{
8+
/// <summary>
9+
/// Authorize the other party to hold currency issued by this account. (No effect unless using the asfRequireAuth
10+
/// AccountSet flag.) Cannot be unset.
11+
/// </summary>
12+
tfSetfAuth = 65536,
13+
14+
/// <summary>
15+
/// Enable the No Ripple flag, which blocks rippling between two trust lines of the same currency if this flag is enabled
16+
/// on both.
17+
/// </summary>
18+
tfSetNoRipple = 131072,
19+
20+
/// <summary>
21+
/// Disable the No Ripple flag, allowing rippling on this trust line.)
22+
/// </summary>
23+
tfClearNoRipple = 262144,
24+
25+
/// <summary>
26+
/// Freeze the trust line.
27+
/// </summary>
28+
tfSetFreeze = 1048576,
29+
30+
/// <summary>
31+
/// Unfreeze the trust line.
32+
/// </summary>
33+
tfClearFreeze = 2097152
34+
}

src/XUMM.NET.SDK/Models/Payload/XRPL/XrplTrustSetTransaction.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
namespace XUMM.NET.SDK.Models.Payload.XRPL;
55

6+
/// <summary>
7+
/// Create or modify a trust line linking two accounts.
8+
/// </summary>
69
public class XrplTrustSetTransaction : XrplTransaction
710
{
811
/// <param name="account">The unique address of the account that initiated the transaction.</param>
@@ -32,9 +35,15 @@ public XrplTrustSetTransaction()
3235
TransactionType = XrplTransactionType.TrustSet.ToString();
3336
}
3437

38+
/// <summary>
39+
/// Transactions of the TrustSet type support additional values in the Flags field.
40+
/// </summary>
41+
[JsonPropertyName("Flags")]
42+
public new XrplTrustSetFlags? Flags { get; set; }
43+
3544
/// <summary>
3645
/// Object defining the trust line to create or modify, in the format of a Currency Amount.
3746
/// </summary>
3847
[JsonPropertyName("LimitAmount")]
39-
public XrplTrustSetLimitAmount LimitAmount { get; set; }
48+
public XrplTrustSetLimitAmount LimitAmount { get; set; } = default!;
4049
}

0 commit comments

Comments
 (0)