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
ledgerKeyLedger 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
signerAccountIdaccount id of Signer that may have it’s sponsorship modified.
signerKeysignerKey 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 -> LedgerKeyXDRParameters
accountIdThe 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 -> LedgerKeyXDRParameters
accountIdThe account ID that owns the data entry.
dataNameThe 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 -> LedgerKeyXDRParameters
accountIdThe account ID that owns the trustline.
assetThe 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 -> LedgerKeyXDRParameters
balanceIdThe 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 -> LedgerKeyXDRParameters
sellerAccountIdThe account ID of the seller who owns the offer.
offerIdThe 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?) throwsParameters
fromXDRthe RevokeSponsorshipOpXDR object to be used to create a new RevokeSponsorshipOperation object.
sourceAccountId(optional) source account Id, must be valid, otherwise it will be ignored.
View on GitHub
Install in Dash