mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add PermissionDelegation feature (#5354)
This change implements the account permission delegation described in XLS-75d, see https://github.com/XRPLF/XRPL-Standards/pull/257. * Introduces transaction-level and granular permissions that can be delegated to other accounts. * Adds `DelegateSet` transaction to grant specified permissions to another account. * Adds `ltDelegate` ledger object to maintain the permission list for delegating/delegated account pair. * Adds an optional `Delegate` field in common fields, allowing a delegated account to send transactions on behalf of the delegating account within the granted permission scope. The `Account` field remains the delegating account; the `Delegate` field specifies the delegated account. The transaction is signed by the delegated account.
This commit is contained in:
@@ -465,7 +465,9 @@ Env::autofill_sig(JTx& jt)
|
||||
return jt.signer(*this, jt);
|
||||
if (!jt.fill_sig)
|
||||
return;
|
||||
auto const account = lookup(jv[jss::Account].asString());
|
||||
auto const account = jv.isMember(sfDelegate.jsonName)
|
||||
? lookup(jv[sfDelegate.jsonName].asString())
|
||||
: lookup(jv[jss::Account].asString());
|
||||
if (!app().checkSigs())
|
||||
{
|
||||
jv[jss::SigningPubKey] = strHex(account.pk().slice());
|
||||
|
||||
Reference in New Issue
Block a user