A Sponsorship ledger entry represents a sponsoring relationship between a sponsor and a sponsee. This allows sponsors to pre-fund sponsees, if they so desire.
This ledger entry does not need to be created in order to sponsor accounts. It is an offered convenience, so that sponsors do not have to co-sign every sponsored transaction if they don't want to, especially for transaction fees. It also allows sponsors to set a maximum balance even if they still want to co-sign transactions.
(Requires the Sponsor amendment )
{
"LedgerEntryType": "Sponsorship",
"Flags": 0,
"Owner": "rN7n7otQDd6FczFgLdlqtyMVrn3HMfXpf",
"Sponsee": "rfkDkFai4jUfCvAJiZ5Vm7XvvWjYvDqeYo",
"FeeAmount": "1000000",
"MaxFee": "1000",
"RemainingOwnerCount": 5,
"OwnerNode": "0000000000000000",
"SponseeNode": "0000000000000000",
"PreviousTxnID": "1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF",
"PreviousTxnLgrSeq": 12345678
}In addition to the common ledger entry fields, a Sponsorship entry has the following fields:
| Field Name | JSON Type | Internal Type | Required? | Description |
|---|---|---|---|---|
FeeAmount | String | Amount | No | The remaining amount of XRP that the sponsor has provided for the sponsee to use for transaction fees. |
MaxFee | String | Amount | No | The maximum fee per transaction that the sponsor will cover. This field helps prevent excessive draining of the pre-funded fee pool. If the sponsee submits a transaction with a fee exceeding this value, the transaction fails. |
Owner | String | AccountID | Yes | The address of the sponsor account. This account pays the reserve for this entry. |
OwnerNode | String | UInt64 | Yes | A hint indicating which page of the sponsor's owner directory links to this entry, in case the directory consists of multiple pages. |
PreviousTxnID | String | Hash256 | Yes | The identifying hash of the transaction that most recently modified this entry. |
PreviousTxnLgrSeq | Number | UInt32 | Yes | The ledger index of the ledger that contains the transaction that most recently modified this entry. |
RemainingOwnerCount | Number | UInt32 | No | The remaining number of owner reserves the sponsor has pre-funded for the sponsee. |
Sponsee | String | AccountID | Yes | The address of the sponsee account associated with this relationship. |
SponseeNode | String | UInt64 | Yes | A hint indicating which page of the sponsee's owner directory links to this entry, in case the directory consists of multiple pages. |
A Sponsorship entry can have the following flags:
| Flag Name | Flag Value | Description |
|---|---|---|
lsfSponsorshipRequireSignForFee | 0x00010000 | If enabled, every transaction that uses this sponsorship for fees requires a signature from the sponsor. If disabled, no signature is necessary, as the existence of the Sponsorship ledger entry is sufficient. |
lsfSponsorshipRequireSignForReserve | 0x00020000 | If enabled, every transaction that uses this sponsorship for reserves requires a signature from the sponsor. If disabled, no signature is necessary, as the existence of the Sponsorship ledger entry is sufficient. |
Either the sponsor or the sponsee can delete a Sponsorship ledger entry using the SponsorshipSet transaction with the tfDeleteObject flag enabled.
The Sponsorship ledger entry is a deletion blocker for both parties. Because the entry appears in both the sponsor's and the sponsee's owner directories, neither the sponsor nor the sponsee can delete their account until the ledger entry is removed.
The ID of a Sponsorship entry is the SHA-512Half of the following values, concatenated in order:
- The Sponsorship space key (
0x003E) - The AccountID of the sponsor (
Ownerfield) - The AccountID of the
Sponsee