最終更新:
編集

DelegateSet

[Source]

Delegate permissions to another account to send transactions on your behalf. This transaction type can grant, change, or revoke permissions; it creates, modifies, or deletes a Delegate ledger entry accordingly.

(Requires the PermissionDelegation amendment .)

Example DelegateSet JSON

{
    "TransactionType": "DelegateSet",
    "Account": "rw81qtsfF9rws4RbmYepf5394gp81TQv5Y",
    "Authorize": "r9GAKojMTyexqvy8DXFWYq63Mod5k5wnkT",
    "Fee": "1",
    "Flags": 0,
    "LastLedgerSequence": 4747822,
    "Permissions": [
        {
            "Permission": {
                "PermissionValue": "AccountDomainSet"
            }
        }
    ],
    "Sequence": 4747802
}
トランザクションの例を確認

DelegateSet Fields

In addition to the common fields, DelegateSet transactions use the following fields:

FieldRequired?JSON TypeInternal TypeDescription
AuthorizeYesString - AddressAccountIDThe account being granted permissions, also called the delegate.
PermissionsYesArrayArrayA list of up to 10 Permission objects each specifying a different permission granted to the delegate. The delegate's permissions are updated to match this set of permissions exactly. To revoke all permissions, use an empty array.

If a Delegate ledger entry does not exist to record the granted permissions, this transaction creates one. If it already exists, the transaction updates the set of permissions to match the list in the transaction: any permissions not listed are revoked. If all permissions are revoked, the transaction deletes the Delegate ledger entry.

Tip

If you want to delegate more than 10 permissions, consider using multi-signing instead.

Permission Objects

Each item in the Permissions array is an inner object with the following nested field:

FieldJSON TypeInternal TypeRequired?Description
PermissionValueString or NumberUInt32YesA permission to grant to the delegate, which can be either a transaction type or a granular permission. See Permission Values for a full list.

Error Cases

Besides errors that can occur for all transactions, DelegateSet transactions can result in the following transaction result codes:

Error CodeDescription
tecDIR_FULLThe sender owns too many items in the ledger already.
tecINSUFFICIENT_RESERVEThe sender does not have enough XRP to meet the reserve requirement of creating a new Delegate ledger entry.
tecNO_PERMISSIONAt least one permission in the Permissions list is not delegatable. See Permission Values for which permissions are not delegatable.
tecNO_TARGETThe account specified in the Authorize field does not exist in the ledger.
temARRAY_TOO_LARGEThe Permissions list is too large. It cannot contain more than 10 entries.
temDISABLEDThe [Permission Delegation amendment][] is not enabled.
temMALFORMEDThe transaction was invalid. For example, the Authorize account is the same as the sender of the transaction, the Permissions list contains duplicate entries, or one of the permissions in the list is not a valid permission.