Class DelegatablePermissions
Maps a Delegate permission between the name rippled reports and the number it serializes.
Inheritance
Namespace: Xrpl.BinaryCodec.Enums
Assembly: Xrpl.BinaryCodec.dll
Syntax
public static class DelegatablePermissions
Remarks
A permission is either a granular one - GranularPermission, values above
ushort.MaxValue - or a transaction type, whose permission value is the
transaction type code plus one. rippled's STUInt32::getJson emits the name whenever
it can resolve one and the number otherwise, and its parser accepts both forms, so the
codec has to understand both as well.
The equivalent in xrpl.js is the delegatablePermissions lookup that
XrplDefinitionsBase associates with the PermissionValue field.
Fields
| Edit this page View SourceUnknownPermissionValue
The value rippled treats as no permission at all, and therefore the one a name this version cannot map is reported as.
Declaration
public const uint UnknownPermissionValue = 0
Field Value
| Type | Description |
|---|---|
| uint |
Methods
| Edit this page View SourceTryGetName(uint, out string)
Maps a numeric permission value back to the name rippled uses for it.
Declaration
public static bool TryGetName(uint value, out string name)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | value | The numeric permission value. |
| string | name | The permission name, when the value is known to this version. |
Returns
| Type | Description |
|---|---|
| bool | True when the value was mapped. |
TryGetValue(string, out uint)
Maps a permission name to its numeric value.
Declaration
public static bool TryGetValue(string name, out uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | A granular permission name or a transaction type name. |
| uint | value | The numeric value, when the name is known to this version. |
Returns
| Type | Description |
|---|---|
| bool | True when the name was mapped. |
TryParse(string, out uint)
Reads a PermissionValue token in either of the forms rippled accepts: a name, a number, or a number written as a string.
Declaration
public static bool TryParse(string token, out uint value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | token | The token as it appears in JSON. |
| uint | value | The numeric value the token denotes. |
Returns
| Type | Description |
|---|---|
| bool | False when the token is a name this version cannot map. |