RevokeSponsorshipOperation
extends AbstractOperation
in package
Represents a Revoke Sponsorship operation.
Removes or transfers sponsorship of a ledger entry or signer. This operation allows the sponsor of a ledger entry or signer to revoke their sponsorship, transferring the responsibility back to the sponsored account.
Tags
Table of Contents
Methods
- fromXdr() : AbstractOperation
- Creates an operation from its XDR representation.
- fromXdrAmount() : string
- Converts an XDR amount (stroops) to a decimal string.
- fromXdrOperation() : RevokeSponsorshipOperation
- Creates a RevokeSponsorshipOperation from XDR operation object.
- getLedgerKey() : XdrLedgerKey|null
- Returns the ledger key of the sponsored entry to revoke.
- getSignerAccount() : string|null
- Returns the account ID that owns the signer being revoked.
- getSignerKey() : XdrSignerKey|null
- Returns the signer key being revoked.
- getSourceAccount() : MuxedAccount|null
- Gets the source account for this operation.
- setLedgerKey() : void
- Sets the ledger key of the sponsored entry to revoke.
- setSignerAccount() : void
- Sets the account ID that owns the signer being revoked.
- setSignerKey() : void
- Sets the signer key being revoked.
- setSourceAccount() : void
- Sets the source account for this operation.
- toOperationBody() : XdrOperationBody
- Converts the operation to its XDR operation body representation.
- toXdr() : XdrOperation
- Converts this operation to its XDR representation.
- toXdrAmount() : BigInteger
- Converts a decimal amount string to XDR amount format (stroops).
Methods
fromXdr()
Creates an operation from its XDR representation.
public
static fromXdr(XdrOperation $xdrOp) : AbstractOperation
Parameters
- $xdrOp : XdrOperation
-
The XDR operation to convert
Return values
AbstractOperation —The resulting operation instance
fromXdrAmount()
Converts an XDR amount (stroops) to a decimal string.
public
static fromXdrAmount(BigInteger $stroops) : string
Parameters
- $stroops : BigInteger
-
The amount in stroops (1 stroop = 0.0000001)
Return values
string —The amount as a decimal string
fromXdrOperation()
Creates a RevokeSponsorshipOperation from XDR operation object.
public
static fromXdrOperation(XdrRevokeSponsorshipOperation $xdrOp) : RevokeSponsorshipOperation
Parameters
- $xdrOp : XdrRevokeSponsorshipOperation
-
The XDR operation object to convert.
Return values
RevokeSponsorshipOperation —The created operation instance.
getLedgerKey()
Returns the ledger key of the sponsored entry to revoke.
public
getLedgerKey() : XdrLedgerKey|null
Return values
XdrLedgerKey|null —The ledger key, or null if revoking a signer.
getSignerAccount()
Returns the account ID that owns the signer being revoked.
public
getSignerAccount() : string|null
Return values
string|null —The signer account ID, or null if revoking a ledger entry.
getSignerKey()
Returns the signer key being revoked.
public
getSignerKey() : XdrSignerKey|null
Return values
XdrSignerKey|null —The signer key, or null if revoking a ledger entry.
getSourceAccount()
Gets the source account for this operation.
public
getSourceAccount() : MuxedAccount|null
Return values
MuxedAccount|null —The source account, or null if using the transaction's source account
setLedgerKey()
Sets the ledger key of the sponsored entry to revoke.
public
setLedgerKey(XdrLedgerKey|null $ledgerKey) : void
Parameters
- $ledgerKey : XdrLedgerKey|null
-
The ledger key.
setSignerAccount()
Sets the account ID that owns the signer being revoked.
public
setSignerAccount(string|null $signerAccount) : void
Parameters
- $signerAccount : string|null
-
The signer account ID.
setSignerKey()
Sets the signer key being revoked.
public
setSignerKey(XdrSignerKey|null $signerKey) : void
Parameters
- $signerKey : XdrSignerKey|null
-
The signer key.
setSourceAccount()
Sets the source account for this operation.
public
setSourceAccount(MuxedAccount|null $sourceAccount) : void
Parameters
- $sourceAccount : MuxedAccount|null
-
The source account, or null to use the transaction's source account
toOperationBody()
Converts the operation to its XDR operation body representation.
public
toOperationBody() : XdrOperationBody
Return values
XdrOperationBody —The XDR operation body.
toXdr()
Converts this operation to its XDR representation.
public
toXdr() : XdrOperation
Return values
XdrOperation —The XDR operation
toXdrAmount()
Converts a decimal amount string to XDR amount format (stroops).
public
static toXdrAmount(string $strAmount) : BigInteger
Parameters
- $strAmount : string
-
The amount as a decimal string
Return values
BigInteger —The amount in stroops (1 stroop = 0.0000001)