RevokeSponsorshipOperation

public class RevokeSponsorshipOperation : Operation, @unchecked Sendable

The logic of this operation depends on the state of the source account. If the source account is not sponsored or is sponsored by the owner of the specified entry or sub-entry, then attempt to revoke the sponsorship. If the source account is sponsored, the next step depends on whether the entry is sponsored or not. If it is sponsored, attempt to transfer the sponsorship to the sponsor of the source account. If the entry is not sponsored, then establish the sponsorship. See Stellar developer docs.

  • The ledger key identifying the ledger entry whose sponsorship is being modified.

    Declaration

    Swift

    public let ledgerKey: LedgerKeyXDR?
  • The account ID of the signer whose sponsorship is being modified.

    Declaration

    Swift

    public let signerAccountId: String?
  • The signer key whose sponsorship is being modified.

    Declaration

    Swift

    public let signerKey: SignerKeyXDR?
  • Creates a new RevokeSponsorshipOperation object.

    Declaration

    Swift

    public init(ledgerKey: LedgerKeyXDR, sourceAccountId: String? = nil)

    Parameters

    ledgerKey

    Ledger key that holds information to identify a specific ledgerEntry that may have it’s sponsorship modified.

  • Declaration

    Swift

    public init(signerAccountId: String, signerKey: SignerKeyXDR, sourceAccountId: String? = nil)

    Parameters

    signerAccountId

    account id of Signer that may have it’s sponsorship modified.

    signerKey

    signerKey of Signer that may have it’s sponsorship modified.

  • Creates a ledger key for revoking sponsorship of an account entry.

    Declaration

    Swift

    public static func revokeAccountSponsorshipLedgerKey(accountId: String) throws -> LedgerKeyXDR

    Parameters

    accountId

    The account ID whose sponsorship will be revoked.

    Return Value

    A ledger key identifying the account entry.

  • Creates a ledger key for revoking sponsorship of a data entry.

    Declaration

    Swift

    public static func revokeDataSponsorshipLedgerKey(accountId: String, dataName: String) throws -> LedgerKeyXDR

    Parameters

    accountId

    The account ID that owns the data entry.

    dataName

    The name of the data entry whose sponsorship will be revoked.

    Return Value

    A ledger key identifying the data entry.

  • Creates a ledger key for revoking sponsorship of a trustline entry.

    Declaration

    Swift

    public static func revokeTrustlineSponsorshipLedgerKey(accountId: String, asset: Asset) throws -> LedgerKeyXDR

    Parameters

    accountId

    The account ID that owns the trustline.

    asset

    The asset of the trustline whose sponsorship will be revoked.

    Return Value

    A ledger key identifying the trustline entry.

  • Creates a ledger key for revoking sponsorship of a claimable balance entry.

    Declaration

    Swift

    public static func revokeClaimableBalanceSponsorshipLedgerKey(balanceId: String) throws -> LedgerKeyXDR

    Parameters

    balanceId

    The claimable balance ID whose sponsorship will be revoked.

    Return Value

    A ledger key identifying the claimable balance entry.

  • Creates a ledger key for revoking sponsorship of an offer entry.

    Declaration

    Swift

    public static func revokeOfferSponsorshipLedgerKey(sellerAccountId: String, offerId: UInt64) throws -> LedgerKeyXDR

    Parameters

    sellerAccountId

    The account ID of the seller who owns the offer.

    offerId

    The offer ID whose sponsorship will be revoked.

    Return Value

    A ledger key identifying the offer entry.

  • Creates a new RevokeSponsorshipOperation object from the given RevokeSponsorshipOperationOpXDR object.

    Declaration

    Swift

    public init(fromXDR: RevokeSponsorshipOpXDR, sourceAccountId: String?) throws

    Parameters

    fromXDR

    the RevokeSponsorshipOpXDR object to be used to create a new RevokeSponsorshipOperation object.

    sourceAccountId

    (optional) source account Id, must be valid, otherwise it will be ignored.