<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yinyi Qian</title>
    <description>The latest articles on DEV Community by Yinyi Qian (@yinyiqian1).</description>
    <link>https://dev.to/yinyiqian1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3291393%2F12edc555-fc2d-46de-a112-2ba6b1b5bb77.png</url>
      <title>DEV Community: Yinyi Qian</title>
      <link>https://dev.to/yinyiqian1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yinyiqian1"/>
    <language>en</language>
    <item>
      <title>Permission Delegation: Unlocking a New Era of XRPL Account Management</title>
      <dc:creator>Yinyi Qian</dc:creator>
      <pubDate>Tue, 24 Jun 2025 20:29:05 +0000</pubDate>
      <link>https://dev.to/ripplexdev/permission-delegation-unlocking-a-new-era-of-xrpl-account-management-34ec</link>
      <guid>https://dev.to/ripplexdev/permission-delegation-unlocking-a-new-era-of-xrpl-account-management-34ec</guid>
      <description>&lt;h2&gt;
  
  
  Introduction: What is Permission Delegation?
&lt;/h2&gt;

&lt;p&gt;The proposed &lt;a href="https://xrpl.org/docs/concepts/accounts/permission-delegation" rel="noopener noreferrer"&gt;&lt;strong&gt;Permission Delegation&lt;/strong&gt;&lt;/a&gt; feature represents a significant upgrade in operational flexibility and security for token issuers, notably by enabling clear segregation of duties. It empowers issuers to delegate specific account actions or transaction types to other designated accounts without the need to share the primary issuer account’s keys. This allows specialized accounts to be authorized for their defined roles instead of being added to the issuer’s main Multi-Signature configuration where any rules are uniformly applied across all transactions regardless of business function. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Permission Delegation&lt;/strong&gt; provides issuers with far more granular control over their operations, facilitating the segregation of duties required to manage diverse business functions. This meaningfully enhances the security of their core account by limiting its direct exposure for certain tasks, ultimately reducing overall risk.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical note&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Feature&lt;/strong&gt;: &lt;a href="https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0075d-permission-delegation" rel="noopener noreferrer"&gt;XLS-75d “Permission Delegation”&lt;/a&gt;, is the new feature that allows delegating specific account actions to another account without sharing keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Definitions&lt;/strong&gt;: &lt;a href="https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0074d-account-permissions" rel="noopener noreferrer"&gt;XLS-74d “Account Permissions”&lt;/a&gt;, is the definer of these permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Performance Testing&lt;/strong&gt;: The Permission Delegation feature has undergone &lt;a href="https://dev.to/ripplexdev/xls-0075d-permission-delegation-performance-test-report-3jmm"&gt;rigorous testing and analysis&lt;/a&gt;. XRPL remains performant across all scenarios, validating that the feature can be safely integrated into the rippled implementation without compromising network stability or performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security Audit&lt;/strong&gt;: &lt;a href="https://dev.to/ripplexdev/permission-delegation-security-audit-findings-2h83"&gt;Permission Delegation Security Audit Findings&lt;/a&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Terminology:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Delegator / Delegating Account: The account that grants permissions.&lt;/li&gt;
&lt;li&gt;Delegatee / Delegated Account: The account that receives permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Feature Highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Granular delegation&lt;/strong&gt;: Assign permissions with multiple levels of precision. This includes granting authority for transaction level actions, as well as more granular permissions that only allow for specific actions within a transaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Ledger and secure&lt;/strong&gt;: Delegation of specific transaction permissions, recorded as a new &lt;code&gt;Delegate&lt;/code&gt; ledger object, enforced by the protocol.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full control&lt;/strong&gt;: Delegator can create, modify, or revoke these permissions at any time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Chain Authorization&lt;/strong&gt;: All transactions executed are signed by the delegated account and permanently recorded on the ledger. This creates a verifiable audit trail for every authorized action, offering a distinct advantage over systems that rely on off-chain policy engines for transaction authorization.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Benefits of Permission Delegation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Enhanced security&lt;/strong&gt;: Permission Delegation drastically reduces the risk associated with compromised keys by allowing the delegation of specific, limited permissions instead of requiring full key access for every action. This fundamentally changes access management and improves security for different participants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Token issuers&lt;/strong&gt; can delegate routine yet essential tasks to separate, specialized accounts without adding them as signers to their primary Multi-Signature setup. These operational accounts receive only the precise permissions needed for their specific function, protecting the integrity of the primary issuing account from risks associated with daily operational needs. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Users&lt;/strong&gt; can grant minimal necessary access to third-party applications for specific tasks without exposing their primary funds or full account control. If a delegated key for a particular service were compromised, their main account and other assets would remain secure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Developers&lt;/strong&gt; can build applications that inherently require less trust from users. dApps can operate effectively by requesting only narrow, clearly defined permissions for specific functionalities. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validators and infrastructure providers&lt;/strong&gt; can potentially apply similar principles of delegation for certain routine, non-critical operational tasks. By assigning specific, limited permissions to separate accounts for these functions, they can enhance their own security posture and contribute to the overall stability of the network.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Increased Flexibility and Granular Control&lt;/strong&gt;: Permission Delegation adds a new layer of Role-Based Access Controls. Access rights can be precisely tailored to specific tasks or roles and facilitate compartmentalization of duties. Different operational aspects of an account can thus be managed with distinct authorizations, enabling safer automation of account interactions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fosters Innovation and Enables New Use Cases&lt;/strong&gt;: By providing a secure mechanism for delegating authority, Permission Delegation directly unlocks a wide array of new possibilities and services. It allows XRPL to support a more diverse range of use cases and encourages innovative solutions.  &lt;/p&gt;

&lt;h2&gt;
  
  
  Use cases unlocked by Permission Delegation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MiCA Compliance&lt;/strong&gt;: Permission Delegation can assist entities in meeting the EU’s MiCA requirements by strengthening governance, operational controls, and third-party risk management.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;For Issuers&lt;/strong&gt;: EU-based stablecoin issuers can meet MiCA’s stringent governance and operational mandates by allowing delegation of specific tasks like redemption processing to distinct internal roles or automated systems. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For Managing Third Parties&lt;/strong&gt;: When entities outsource functions or engage third party services, Permission Delegation enables them to grant only minimal, task-specific functions. For instance, a business raising funds through tokenized debt or equity sales can enable other distributors to help run KYC checks and facilitate the distribution of assets. Another example is law enforcement, where an issuer could outsource Freeze and Clawback capabilities for a compliance provider who can sign for that action in cases of a government order.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RLUSD&lt;/strong&gt;: Ripple plans to use Permission Delegation for the RLUSD stablecoin, using the feature to segregate signing responsibilities by delegating permissions for specific transaction types to distinct, specialized accounts. Each of these delegated accounts, managed by different segments of our global operations team, will only have the authority needed for their particular function. This increases issuer account security by having different signer lists sign for different transactions. Additionally, it will scale the number of signers which can interact with the issuer account, allowing us to scale our global operations team more easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Automated Financial Services&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automated payments: Delegate &lt;code&gt;Payment&lt;/code&gt; permission to a service to make specific, recurring payments on your behalf.&lt;/li&gt;
&lt;li&gt;Portfolio management: Grant limited permissions (e.g., &lt;code&gt;OfferCreate&lt;/code&gt; for specific pairs, &lt;code&gt;TrustSet&lt;/code&gt; for vetted assets) to an automated service to manage a portion of a user's portfolio.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Enhanced Security and Key Management&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Outsource Critical Compliance Functions&lt;/strong&gt;: Stablecoin issuers can delegate permission for &lt;code&gt;Freeze&lt;/code&gt; and &lt;code&gt;Clawback&lt;/code&gt; transactions to a specialized account managed by a trusted KYT provider to mitigate financial crime.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Business and Organizational Accounts&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Corporate Treasury Management&lt;/strong&gt;: Delegate specific permissions to different departments or employees (e.g., payroll account can only make &lt;code&gt;Payment&lt;/code&gt; transactions, an auditor account gets permission for specific data-setting transactions, if applicable).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DeFi and Specialized Interactions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Controlled AMM Participation&lt;/strong&gt;: Delegate permissions like &lt;code&gt;AMMDeposit&lt;/code&gt;, &lt;code&gt;AMMWithdraw&lt;/code&gt;, or &lt;code&gt;AMMVote&lt;/code&gt; to a third-party service or a bot that executes predefined strategies, without exposing the user's entire capital.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issuer-Managed Authorizations&lt;/strong&gt;: An issuer could delegate the ability to authorize trustlines (&lt;code&gt;TrustSet&lt;/code&gt; with &lt;code&gt;tfSetfAuth&lt;/code&gt;) for their token to a KYC/KYB provider.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get Started: Testing PermissionDelegation on Devnet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Make sure your client libraries (e.g., xrpl.js, xrpl-py) are updated to a version that supports PermissionDelegation amendment if you plan to use them. (Minimum required versions: &lt;a href="https://github.com/XRPLF/xrpl.js/releases/tag/xrpl%404.3.0" rel="noopener noreferrer"&gt;xrpl@4.3.0&lt;/a&gt; , &lt;a href="https://github.com/XRPLF/xrpl-py/releases/tag/v4.2.0" rel="noopener noreferrer"&gt;xrpl-py@4.2.0&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Alternatively, you can send requests directly without any libraries by using tools like &lt;strong&gt;Postman&lt;/strong&gt; or &lt;strong&gt;curl&lt;/strong&gt;. Both &lt;strong&gt;HTTP&lt;/strong&gt; and &lt;strong&gt;WebSocket&lt;/strong&gt; protocols are supported.&lt;/li&gt;
&lt;li&gt;The XLS-75d amendment &lt;code&gt;PermissionDelegation&lt;/code&gt; must be enabled on the Devnet instance you are using.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Accessing Devnet
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Obtain test accounts and fund with XRP from an XRPL Faucet:
&lt;a href="https://xrpl.org/resources/dev-tools/xrp-faucets" rel="noopener noreferrer"&gt;https://xrpl.org/resources/dev-tools/xrp-faucets&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Connect to a Devnet server via WebSocket:
&lt;code&gt;wss://s.devnet.rippletest.net:51233&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Alternatively, you can send requests through HTTP: 
&lt;code&gt;https://s.devnet.rippletest.net:51234&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Optionally, you can start your own local server to join the Devnet. This allows you to send requests directly to your server using a custom IP address and port that you configure. &lt;a href="https://xrpl.org/docs/infrastructure/configuration/connect-your-rippled-to-the-xrp-test-net" rel="noopener noreferrer"&gt;Find more details here.&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Basic Test Scenario
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Delegate&lt;/strong&gt;: Using Account A (Delegating Account), submit an &lt;code&gt;DelegateSet&lt;/code&gt; transaction to grant Account B (Delegated Account) specific permissions, such as &lt;code&gt;Payment&lt;/code&gt;, and &lt;code&gt;TrustSet&lt;/code&gt;. The following request is a websocket request example sent to &lt;code&gt;wss://s.devnet.rippletest.net:51233&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"tx_json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"TransactionType"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegateSet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Account"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Authorize"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatedAccount_B"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Permissions"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"Permission"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"PermissionValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Payment"&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"Permission"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"PermissionValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TrustSet"&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A_secret"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can send request via HTTP&lt;br&gt;
&lt;code&gt;https://s.devnet.rippletest.net:51234&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="nl"&gt;"tx_json"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"TransactionType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegateSet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Account"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Authorize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatedAccount_B"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="nl"&gt;"Permissions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"Permission"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"PermissionValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Payment"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
           &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"Permission"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"PermissionValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TrustSet"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
         &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
       &lt;/span&gt;&lt;span class="nl"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A_secret"&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt;: Check ledger entry for the new &lt;code&gt;Delegate&lt;/code&gt; object.
For example, send HTTP request:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ledger_entry"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="nl"&gt;"params"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"delegate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"account"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"authorize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatedAccount_B"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"ledger_index"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"validated"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
 &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Execute&lt;/strong&gt;: Using Account B, attempt to send a &lt;code&gt;Payment&lt;/code&gt; transaction on behalf of  Account A. Here is an example of the delegation &lt;code&gt;Payment&lt;/code&gt; by websocket:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"tx_json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"TransactionType"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Payment"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Account"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"delegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Destination"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"destinationAccount"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"DeliverMax"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Fee"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Delegate"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"delegatedAccount_B"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"delegatedAccount_B_secret"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can send an HTTP request. If the delegation is valid, the request will succeed.&lt;br&gt;
Account A will initiate a payment of up to 100 XRP to the destination, while Account B will cover the transaction fee.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Revoke/Update Permissions&lt;/strong&gt;: Using Account A, submit a &lt;code&gt;DelegateSet&lt;/code&gt; transaction to update the &lt;code&gt;Delegate&lt;/code&gt; object and verify that Account B can no longer perform the revoked action. For example, if Account A wants to revoke the &lt;code&gt;Payment&lt;/code&gt; permission but retain the &lt;code&gt;TrustSet&lt;/code&gt; permission, simply remove &lt;code&gt;Payment&lt;/code&gt; from the permission list. The new &lt;code&gt;DelegateSet&lt;/code&gt; transaction will override the previous &lt;code&gt;Permissions&lt;/code&gt; entirely.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"tx_json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"TransactionType"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegateSet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Account"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Authorize"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatedAccount_B"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Permissions"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"Permission"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"PermissionValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"TrustSet"&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A_secret"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;If Account A wants to revoke all permissions, simply submit an empty permission list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="nl"&gt;"tx_json"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"TransactionType"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegateSet"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Account"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Authorize"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DelegatedAccount_B"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"Permissions"&lt;/span&gt;&lt;span class="p"&gt;:[&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"secret"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"DelegatingAccount_A_secret"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Permissions&lt;/code&gt; field’s permission list replaces the entire set, so Account A can revoke some permissions while simultaneously adding new ones.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Granular Permissions&lt;/strong&gt;:
You can also try granting granular permissions, such as &lt;code&gt;AccountDomainSet&lt;/code&gt;, which allows the delegated account to change the delegating account's domain by submitting an &lt;code&gt;AccountSet&lt;/code&gt; transaction. Please note that the &lt;code&gt;AccountDomainSet&lt;/code&gt; permission only authorizes domain changes. Any other modifications using &lt;code&gt;AccountSet&lt;/code&gt;, such as setting flags or changing the transfer rate, will not be permitted.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Test Using Libraries
&lt;/h3&gt;

&lt;p&gt;The following demonstrates testing with xrpl.js.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Connect to Devnet&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;xrpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wss://s.devnet.rippletest.net:51233&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
 &lt;span class="c1"&gt;// … custom code goes here&lt;/span&gt;
 &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;disconnect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Delegate&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delegator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;xrpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Wallet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromSeed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sDelegator...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delegatee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;xrpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Wallet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fromSeed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sDelegatee...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delegateTx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;autofill&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="na"&gt;TransactionType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;DelegateSet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Account&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Authorize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegatee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Permission&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;PermissionValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Payment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
       &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;Permission&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;PermissionValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;TrustSet&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
   &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;delegateResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submitAndWait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delegateTx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegator&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delegateResponse&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Execute&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;paymentTx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;autofill&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
   &lt;span class="na"&gt;TransactionType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Payment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Account&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;xrpl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xrpToDrops&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
   &lt;span class="na"&gt;Destination&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rDestination...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
   &lt;span class="na"&gt;Delegate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegatee&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;paymentResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submitAndWait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paymentTx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;delegatee&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paymentResponse&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Feedback and Amendment Voting:
&lt;/h2&gt;

&lt;p&gt;Validator operators and any interested developers in the community are encouraged to read more about the PermissionDelegation amendment and experiment with it on Devnet. Everyone is encouraged to provide feedback on the amendment and ask any questions.&lt;/p&gt;

&lt;p&gt;To support the adoption of Permission Delegation on the XRPL, you can participate in the amendment voting process!&lt;/p&gt;

&lt;p&gt;Refer to the &lt;a href="https://xrpl.org/docs/concepts/networks-and-servers/amendments" rel="noopener noreferrer"&gt;Amendments Guide&lt;/a&gt; for a step-by-step overview of how to vote.&lt;/p&gt;

&lt;p&gt;New to the XRPL? The guide also explains how the amendment process works and how you can contribute to the network’s evolution.&lt;/p&gt;

</description>
      <category>xrpl</category>
      <category>web3</category>
      <category>blockchain</category>
      <category>ripple</category>
    </item>
    <item>
      <title>Permission Delegation Security Audit Findings</title>
      <dc:creator>Yinyi Qian</dc:creator>
      <pubDate>Tue, 24 Jun 2025 20:16:05 +0000</pubDate>
      <link>https://dev.to/ripplexdev/permission-delegation-security-audit-findings-2h83</link>
      <guid>https://dev.to/ripplexdev/permission-delegation-security-audit-findings-2h83</guid>
      <description>&lt;p&gt;&lt;strong&gt;Permission Delegation&lt;/strong&gt; is among the latest features coming to XRPL, and will offer developers and token issuers enhanced security and operational flexibility through clear segregation of duties. As a powerful new feature, it is imperative that its codebase is reviewed by a professional third party. We have engaged the security experts at &lt;a href="https://www.fyeo.io/" rel="noopener noreferrer"&gt;FYEO&lt;/a&gt; to perform a security audit of the Permission Delegation feature. We are pleased to report that all findings classified as High or Low severity have been fully remediated.&lt;/p&gt;

&lt;p&gt;The full, detailed report from FYEO is available for public review here: &lt;a href="https://github.com/fyeo-io/public-audit-reports/blob/main/Code%20Audit%20Reports/2025/Ripple/Ripple%20-%20Security%20Code%20Review%20of%20XRPL%20Permission%20Delegation%20v1.0%20FINAL.pdf" rel="noopener noreferrer"&gt;Link&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary of Key Findings
&lt;/h2&gt;

&lt;p&gt;The security audit identified four findings, which FYEO categorized by severity. Our engineering team has addressed each of them as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shadowed variable (High severity) - &lt;strong&gt;Remediated&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Code optimization (Low severity) - &lt;strong&gt;Remediated&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Concerns for Exchanges, Bridges, 3rd party tooling (informational) - &lt;strong&gt;Acknowledged&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The DelegateSet SLE can be created empty (informational) - &lt;strong&gt;Remediated&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Detailed Findings and Our Response
&lt;/h2&gt;

&lt;p&gt;As background, FYEO notes that this new feature introduces new ledger object, &lt;code&gt;ltDELEGATE&lt;/code&gt;, and transaction type, &lt;code&gt;DelegateSet&lt;/code&gt;. The code checks for the presence of a delegate field, verifies that the delegated account holds the required permission, and confirms the signing key matches the delegate. Transaction fees will be deducted from the delegate’s account rather than the original account. This introduces complexity in ensuring the correct amount is charged for fees and that permissions are accurately verified.&lt;/p&gt;

&lt;h3&gt;
  
  
  Finding 1: Shadowed variable (High severity)
&lt;/h3&gt;

&lt;p&gt;A function parameter was unintentionally "shadowed" by a local variable with the same name, which could nullify the intended filtering logic. The risk was that this could lead to incorrect behavior during transaction processing, potentially allowing unintended operations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remediation&lt;/strong&gt;: We have resolved the issue by renaming the variables to ensure they are distinct.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Finding 2: Code optimization (Low severity)
&lt;/h3&gt;

&lt;p&gt;FYEO identified areas where the code could be refactored for better performance, clarity, and long-term maintainability. This did not pose a security risk.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remediation&lt;/strong&gt;: We have addressed these suggestions by introducing a whitelist for permitted transaction types, correcting typos, and refactoring the logic for type conversion.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Finding 3: Concerns for Exchanges, Bridges, 3rd party tooling (Informational)
&lt;/h3&gt;

&lt;p&gt;Permission Delegation changes how transaction fees are paid (deducted from the delegate account, not the originating account). Thus, external systems like exchanges, bridges, and tools must be updated to account for this new logic to avoid miscalculating balances. This is not a code defect but a necessary consideration for the ecosystem.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Acknowledgement&lt;/strong&gt;: We acknowledge this finding and are committed to providing clear and explicit documentation for all ecosystem partners. As recommended, we will provide integration guidance with examples and proactively notify integrators about these logic changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Finding 4: The DelegateSet SLE can be created empty (Informational)
&lt;/h3&gt;

&lt;p&gt;The code could create an empty delegate ledger object if one didn’t already exist and the incoming permission set was empty. While not a security threat, this could lead to unnecessary clutter on the ledger. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Remediation&lt;/strong&gt;: We have addressed this by adding an additional check for empty permissions in the case where no delegate ledger object exists. This will prevent empty objects from being stored on the ledger. &lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>xrpl</category>
      <category>blockchain</category>
      <category>ripple</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
