Stellar PHP SDK API Documentation

AssetBalanceChangeResponse

Represents an asset balance change from a Soroban contract invocation

Tracks a single asset balance change that occurred during smart contract execution. This includes the asset details, the type of change (transfer, mint, burn, clawback), the accounts involved, and the amount transferred. Used to monitor asset flows within Soroban contract operations.

Table of Contents

Properties

$amount  : string
$assetCode  : string|null
$assetIssuer  : string|null
$assetType  : string
$destinationMuxedId  : string|null
$from  : string|null
$to  : string
$type  : string

Methods

fromJson()  : AssetBalanceChangeResponse
getAmount()  : string
Gets the amount of the balance change
getAssetCode()  : string|null
Gets the asset code
getAssetIssuer()  : string|null
Gets the asset issuer
getAssetType()  : string
Gets the asset type
getDestinationMuxedId()  : string|null
Gets the multiplexed destination account ID
getFrom()  : string|null
Gets the source account of the transfer
getTo()  : string
Gets the destination account of the transfer
getType()  : string
Gets the type of balance change
setAmount()  : void
Sets the amount of the balance change
setAssetCode()  : void
Sets the asset code
setAssetIssuer()  : void
Sets the asset issuer
setAssetType()  : void
Sets the asset type
setDestinationMuxedId()  : void
Sets the multiplexed destination account ID
setFrom()  : void
Sets the source account of the transfer
setTo()  : void
Sets the destination account of the transfer
setType()  : void
Sets the type of balance change
loadFromJson()  : void

Properties

Methods

getAmount()

Gets the amount of the balance change

public getAmount() : string
Return values
string

The amount as a string to preserve precision

getAssetCode()

Gets the asset code

public getAssetCode() : string|null
Return values
string|null

The asset code or null for native assets

getAssetIssuer()

Gets the asset issuer

public getAssetIssuer() : string|null
Return values
string|null

The asset issuer account ID or null for native assets

getAssetType()

Gets the asset type

public getAssetType() : string
Return values
string

The asset type (native, credit_alphanum4, or credit_alphanum12)

getDestinationMuxedId()

Gets the multiplexed destination account ID

public getDestinationMuxedId() : string|null
Return values
string|null

The muxed destination account ID as uint64 string or null

getFrom()

Gets the source account of the transfer

public getFrom() : string|null
Return values
string|null

The source account ID or null for mint operations

getTo()

Gets the destination account of the transfer

public getTo() : string
Return values
string

The destination account ID

getType()

Gets the type of balance change

public getType() : string
Return values
string

Change type (transfer, mint, burn, or clawback)

setAmount()

Sets the amount of the balance change

public setAmount(string $amount) : void
Parameters
$amount : string

The amount

setAssetCode()

Sets the asset code

public setAssetCode(string|null $assetCode) : void
Parameters
$assetCode : string|null

The asset code

setAssetIssuer()

Sets the asset issuer

public setAssetIssuer(string|null $assetIssuer) : void
Parameters
$assetIssuer : string|null

The asset issuer account ID

setAssetType()

Sets the asset type

public setAssetType(string $assetType) : void
Parameters
$assetType : string

The asset type

setDestinationMuxedId()

Sets the multiplexed destination account ID

public setDestinationMuxedId(string|null $destinationMuxedId) : void
Parameters
$destinationMuxedId : string|null

The muxed destination account ID

setFrom()

Sets the source account of the transfer

public setFrom(string|null $from) : void
Parameters
$from : string|null

The source account ID

setTo()

Sets the destination account of the transfer

public setTo(string $to) : void
Parameters
$to : string

The destination account ID

setType()

Sets the type of balance change

public setType(string $type) : void
Parameters
$type : string

Change type

loadFromJson()

protected loadFromJson(array<string|int, mixed> $json) : void
Parameters
$json : array<string|int, mixed>

        
On this page

Search results