InvokeHostFunctionOperationBuilder
in package
Builder for creating InvokeHostFunction operations.
This builder implements the builder pattern to construct InvokeHostFunctionOperation instances with a fluent interface. This operation invokes Soroban smart contract functions on the Stellar network, supporting contract deployment, invocation, and asset operations.
Tags
Table of Contents
Properties
- $auth : array<string|int, mixed>
- $function : HostFunction
- $sourceAccount : MuxedAccount|null
Methods
- __construct() : mixed
- Creates a new InvokeHostFunction operation builder.
- build() : InvokeHostFunctionOperation
- Builds the InvokeHostFunction operation.
- setMuxedSourceAccount() : $this
- Sets the muxed source account for this operation.
- setSourceAccount() : $this
- Sets the source account for this operation.
Properties
$auth
public
array<string|int, mixed>
$auth
= array()
$function
public
HostFunction
$function
$sourceAccount
public
MuxedAccount|null
$sourceAccount
= null
The optional source account for this operation
Methods
__construct()
Creates a new InvokeHostFunction operation builder.
public
__construct(HostFunction $function[, array<string|int, SorobanAuthorizationEntry> $auth = array() ]) : mixed
Parameters
- $function : HostFunction
-
The host function to invoke
- $auth : array<string|int, SorobanAuthorizationEntry> = array()
-
The authorization entries for the invocation
build()
Builds the InvokeHostFunction operation.
public
build() : InvokeHostFunctionOperation
Tags
Return values
InvokeHostFunctionOperation —The constructed operation
setMuxedSourceAccount()
Sets the muxed source account for this operation.
public
setMuxedSourceAccount(MuxedAccount $sourceAccount) : $this
Parameters
- $sourceAccount : MuxedAccount
-
The muxed account to use as source
Return values
$this —Returns the builder instance for method chaining
setSourceAccount()
Sets the source account for this operation.
public
setSourceAccount(string $accountId) : $this
Parameters
- $accountId : string
-
The Stellar account ID (G...)
Return values
$this —Returns the builder instance for method chaining