Stellar PHP SDK API Documentation

SetTrustLineFlagsOperation extends AbstractOperation
in package

Represents a Set Trustline Flags operation.

Allows the issuer of an asset to set flags on a trustline. This enables control over whether accounts can hold the asset, whether it can be clawed back, and other authorization settings.

Tags
see

Stellar developer docs

see
SetTrustLineFlagsOperationBuilder

For building this operation

since
1.0.0

Table of Contents

Methods

__construct()  : mixed
Constructs a new SetTrustLineFlagsOperation object.
fromXdr()  : AbstractOperation
Creates an operation from its XDR representation.
fromXdrAmount()  : string
Converts an XDR amount (stroops) to a decimal string.
fromXdrOperation()  : SetTrustLineFlagsOperation
Creates a SetTrustLineFlagsOperation from XDR operation object.
getAsset()  : Asset
Returns the asset of the trustline.
getClearFlags()  : int
Returns flags to clear on the trustline.
getSetFlags()  : int
Returns flags to set on the trustline.
getSourceAccount()  : MuxedAccount|null
Gets the source account for this operation.
getTrustorId()  : string
Returns the account ID of the trustline holder.
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

__construct()

Constructs a new SetTrustLineFlagsOperation object.

public __construct(string $trustorId, Asset $asset, int $clearFlags, int $setFlags) : mixed
Parameters
$trustorId : string

The account ID of the trustline holder

$asset : Asset

The asset of the trustline

$clearFlags : int

Flags to clear on the trustline

$setFlags : int

Flags to set on the trustline

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

getClearFlags()

Returns flags to clear on the trustline.

public getClearFlags() : int
Return values
int

The flags to clear.

getSetFlags()

Returns flags to set on the trustline.

public getSetFlags() : int
Return values
int

The flags to set.

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

getTrustorId()

Returns the account ID of the trustline holder.

public getTrustorId() : string
Return values
string

The trustor account ID.

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

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)


        
On this page

Search results