Skip to content

Sponsorship

[Source]

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.

Note

This object 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 )

Example JSON

{
  "LedgerEntryType": "Sponsorship",
  "Flags": 0,
  "Owner": "rN7n7otQDd6FczFgLdlqtyMVrn3HMfXpf",
  "Sponsee": "rfkDkFai4jUfCvAJiZ5Vm7XvvWjYvDqeYo",
  "FeeAmount": "1000000",
  "MaxFee": "1000",
  "ReserveCount": 5,
  "OwnerNode": "0000000000000000",
  "SponseeNode": "0000000000000000",
  "PreviousTxnID": "1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF1234567890ABCDEF",
  "PreviousTxnLgrSeq": 12345678
}

Sponsorship Fields

In addition to the common ledger entry fields, a Sponsorship entry has the following fields:

Field NameJSON TypeInternal TypeRequired?Description
FeeAmountStringAmountNoThe remaining amount of XRP that the sponsor has provided for the sponsee to use for transaction fees.
MaxFeeStringAmountNoThe 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.
OwnerStringAccountIDYesThe address of the sponsor account. This account pays the reserve for this object.
OwnerNodeStringUInt64YesA hint indicating which page of the sponsor's owner directory links to this object, in case the directory consists of multiple pages.
PreviousTxnIDStringHash256YesThe identifying hash of the transaction that most recently modified this entry.
PreviousTxnLgrSeqNumberUInt32YesThe ledger index of the ledger that contains the transaction that most recently modified this object.
ReserveCountNumberUInt32NoThe remaining number of owner reserves the sponsor has pre-funded for the sponsee.
SponseeStringAccountIDYesThe address of the sponsee account associated with this relationship.
SponseeNodeStringUInt64YesA hint indicating which page of the sponsee's owner directory links to this object, in case the directory consists of multiple pages.

Sponsorship Flags

A Sponsorship entry can have the following flags:

Flag NameFlag ValueDescription
lsfSponsorshipRequireSignForFee0x00010000If 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 object is sufficient.
lsfSponsorshipRequireSignForReserve0x00020000If 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 object is sufficient.

Deleting a Sponsorship Object

Either the sponsor or the sponsee can delete a Sponsorship object using the SponsorshipSet transaction with the tfDeleteObject flag enabled.

Warning

The Sponsorship object is a deletion blocker. A sponsor cannot delete their account until all their Sponsorship objects are removed.

Sponsorship ID Format

The ID of a Sponsorship entry is the SHA-512Half 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