Validates a transaction's sponsorship (Sponsor + SponsorFlags) against any
Sponsorship ledger entry between the sponsor and sponsee.
This should be called before submitting any sponsored transaction, whether
pre-funded (no SponsorSignature) or co-signed by the sponsor. Whenever a
Sponsorship ledger entry exists for the sponsor/sponsee pair, rippled's
checkReserve/getFeePayer always validate against its budget -- FeeAmount,
MaxFee, RemainingOwnerCount -- regardless of whether the transaction is
also co-signed (XLS-68 section 8.3.2/8.3.3; rippled's Transactor::checkSponsor
only skips the existence check for a co-signed transaction, not the budget
checks in checkReserve/getFeePayer). If no Sponsorship entry exists, a
sponsor signature alone is sufficient authorization (matching rippled), and
this only validates that one is present.
For reserve sponsorship, this only checks that RemainingOwnerCount is at
least 1 (i.e. the transaction consumes exactly one reserve unit, matching
rippled's checkReserve). It does not account for transactions that may
consume more than one reserve unit, nor does it check the sponsor account's
own XRP balance against its own reserve requirement (rippled checks that too,
but only server-side).
Validates a transaction's sponsorship (
Sponsor+SponsorFlags) against any Sponsorship ledger entry between the sponsor and sponsee.This should be called before submitting any sponsored transaction, whether pre-funded (no
SponsorSignature) or co-signed by the sponsor. Whenever a Sponsorship ledger entry exists for the sponsor/sponsee pair, rippled'scheckReserve/getFeePayeralways validate against its budget --FeeAmount,MaxFee,RemainingOwnerCount-- regardless of whether the transaction is also co-signed (XLS-68 section 8.3.2/8.3.3; rippled'sTransactor::checkSponsoronly skips the existence check for a co-signed transaction, not the budget checks incheckReserve/getFeePayer). If no Sponsorship entry exists, a sponsor signature alone is sufficient authorization (matching rippled), and this only validates that one is present.For reserve sponsorship, this only checks that
RemainingOwnerCountis at least 1 (i.e. the transaction consumes exactly one reserve unit, matching rippled'scheckReserve). It does not account for transactions that may consume more than one reserve unit, nor does it check the sponsor account's own XRP balance against its own reserve requirement (rippled checks that too, but only server-side).