Transaction Common Fields
The change to the common fields topic introduced for this feature is the new Delegate
object. For the full draft topic in context, see Transaction Common Fields.
Delegate
Account permission delegation functionality is part of the proposed XLS-75d extension to the XRP Ledger protocol. You can use these functions on test networks for now. Until there is an amendment in a stable release, the details documented on these pages are subject to change.
The Delegate
ledger object stores a set of permissions that an XRPL account has delegated to another account. You create Delegate
objects using the DelegateSet
transaction.
Example Delegate JSON
This sample Delegate
object shows that the rISAAC account has delegated TrustLineAuthorize
permission to the rKYLIE account.
{
"LedgerEntryType": "Delegate",
"Account": "rISAAC......",
"Authorize": "rKYLIE......",
"Permissions": [{"Permission": {"PermissionValue": "TrustlineAuthorize"}}],
}
Structure
A Delegate
object has the following fields:
Field Name | Required? | JSON Type | Internal Type | Description |
---|---|---|---|---|
LedgerIndex | ✔️ | string | Hash256 | The unique ID of the ledger object. |
LedgerEntryType | ✔️ | string | UInt16 | The ledger object's type (Delegate ) |
Account | ✔️ | string | AccountID | The account that delegates permissions to another account. |
Authorize | ✔️ | string | AccountID | The account to which permissions are delegated. |
Permissions | ✔️ | string | STArray | The transaction permissions that the Authorize account has been granted. |
OwnerNode | ✔️ | string | UInt64 | A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages. |
PreviousTxnID | ✔️ | string | Hash256 | The identifying hash of the transaction that most recently modified this object. |
PreviousTxnLgrSeqNumber | ✔️ | number | UInt32 | The index of the ledger that contains the transaction that most recently modified this object. |
Retrieving Delegate Objects
You can retrieve Delegate
ledger objects using the ledger_entry
RPC method. The unique ID of a Delegate
object is a hash of the Account
and Authorize
fields, combined with the unique space key for Delegate objects.
Account Deletion
A Delegate
object is not a deletion blocker. This means that deleting an account removes any Delegate
objects associated with it.