Stellar PHP SDK API Documentation

ChangeTrustOperation extends AbstractOperation
in package

Represents a change trust operation.

Creates, updates, or deletes a trust line between the source account and an asset.

Tags
see

Stellar developer docs

since
1.0.0

Table of Contents

Methods

__construct()  : mixed
Creates a new ChangeTrustOperation object.
fromXdr()  : AbstractOperation
Creates an operation from its XDR representation.
fromXdrAmount()  : string
Converts an XDR amount (stroops) to a decimal string.
fromXdrOperation()  : ChangeTrustOperation
Creates a ChangeTrustOperation from its XDR representation.
getAsset()  : Asset
Gets the asset of the trust line.
getLimit()  : string
Gets the trust line limit.
getSourceAccount()  : MuxedAccount|null
Gets the source account for this operation.
setSourceAccount()  : void
Sets the source account for this operation.
toOperationBody()  : XdrOperationBody
Converts this 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()

Creates a new ChangeTrustOperation object.

public __construct(Asset $asset[, string|null $limit = null ]) : mixed
Parameters
$asset : Asset

The asset for the trust line

$limit : string|null = null

The trust line limit (as a decimal string). If null, defaults to maximum. Set to "0" to remove the trust line.

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

getLimit()

Gets the trust line limit.

public getLimit() : string
Return values
string

The limit as a decimal string

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

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