# Sponsorship

[[Source]](https://github.com/XRPLF/rippled/blob/release/3.3.x/include/xrpl/protocol/detail/ledger_entries.macro#L627-L637)

A  ledger entry represents a sponsoring relationship between a sponsor and a sponsee. This allows sponsors to *pre-fund* sponsees, if they so desire.

_Requires the [Sponsor amendment](/resources/known-amendments#sponsor). (Inactive)_

Note
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.

## Example Sponsorship JSON

```json
{
  "LedgerEntryType": "Sponsorship",
  "Flags": 0,
  "Owner": "rpUqggHmAvbeWDr3v8QPTds7HgFBPKNkLX",
  "OwnerNode": "0",
  "RemainingOwnerCount": 9,
  "Sponsee": "rEfvNyfG1GC4CXxqe4ct3KJBRz6oW6NPrD",
  "SponseeNode": "0"
}
```

##  Fields

In addition to the [common fields](/ja/docs/references/protocol/ledger-data/common-fields), a  entry has the following fields:

| Field Name | JSON Type | [Internal Type](/docs/references/protocol/binary-format) | Required? | Description |
|  --- | --- | --- | --- | --- |
| `FeeAmount` | String | Amount | No | The remaining amount of XRP that the sponsor has provided for the sponsee to use for transaction fees. The sponsor adjusts this amount using the `FeeAmountDelta` field of a [SponsorshipSet transaction](/docs/references/protocol/transactions/types/sponsorshipset). |
| `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](/docs/references/protocol/data-types/basic-data-types#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. The sponsor adjusts this count using the `RemainingOwnerCountDelta` field of a [SponsorshipSet transaction](/docs/references/protocol/transactions/types/sponsorshipset). |
| `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. |


##  Flags

A  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  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  ledger entry is sufficient. |


## Deleting a Sponsorship Ledger Entry

Either the sponsor or the sponsee can delete a  ledger entry using the [SponsorshipSet transaction](/docs/references/protocol/transactions/types/sponsorshipset) with the `tfDeleteObject` flag enabled.

Warning
The  ledger entry is a [deletion blocker](/ja/docs/concepts/accounts/deleting-accounts#deletion-blockers) 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.

## Sponsorship ID Format

The ID of a  entry is the [SHA-512Half](/docs/references/protocol/data-types/basic-data-types#hashes) of the following values, concatenated in order:

1. The Sponsorship space key (`0x003E`)
2. The AccountID of the sponsor (`Owner` field)
3. The AccountID of the `Sponsee`


## See Also

- **References:**
  - [SponsorshipSet transaction](/docs/references/protocol/transactions/types/sponsorshipset)
  - [SponsorshipTransfer transaction](/docs/references/protocol/transactions/types/sponsorshiptransfer)