SorobanAuthorizedInvocation
in package
Authorized invocation tree for Soroban authorization
This class represents a node in the tree of authorized invocations. Each node contains a function to be authorized and a list of sub-invocations that the function is allowed to make. This creates a complete authorization tree for complex contract call chains.
Tags
Table of Contents
Properties
- $function : SorobanAuthorizedFunction
- $subInvocations : array<string|int, SorobanAuthorizedInvocation>
Methods
- __construct() : mixed
- Creates a new authorized invocation node.
- fromXdr() : SorobanAuthorizedInvocation
- Creates SorobanAuthorizedInvocation from its XDR representation.
- getFunction() : SorobanAuthorizedFunction
- Returns the function being authorized.
- getSubInvocations() : array<string|int, SorobanAuthorizedInvocation>
- Returns the authorized sub-invocations.
- setFunction() : void
- Sets the function being authorized.
- setSubInvocations() : void
- Sets the authorized sub-invocations.
- toXdr() : XdrSorobanAuthorizedInvocation
- Converts this object to its XDR representation.
Properties
$function
public
SorobanAuthorizedFunction
$function
the function being authorized at this node
$subInvocations
public
array<string|int, SorobanAuthorizedInvocation>
$subInvocations
sub-invocations this function is authorized to make
Methods
__construct()
Creates a new authorized invocation node.
public
__construct(SorobanAuthorizedFunction $function[, array<string|int, SorobanAuthorizedInvocation> $subInvocations = array() ]) : mixed
Parameters
- $function : SorobanAuthorizedFunction
-
the function to authorize
- $subInvocations : array<string|int, SorobanAuthorizedInvocation> = array()
-
authorized sub-invocations (defaults to empty)
fromXdr()
Creates SorobanAuthorizedInvocation from its XDR representation.
public
static fromXdr(XdrSorobanAuthorizedInvocation $xdr) : SorobanAuthorizedInvocation
Parameters
- $xdr : XdrSorobanAuthorizedInvocation
-
the XDR object to decode
Return values
SorobanAuthorizedInvocation —the decoded authorized invocation tree
getFunction()
Returns the function being authorized.
public
getFunction() : SorobanAuthorizedFunction
Return values
SorobanAuthorizedFunction —the authorized function
getSubInvocations()
Returns the authorized sub-invocations.
public
getSubInvocations() : array<string|int, SorobanAuthorizedInvocation>
Return values
array<string|int, SorobanAuthorizedInvocation> —the list of authorized sub-invocations
setFunction()
Sets the function being authorized.
public
setFunction(SorobanAuthorizedFunction $function) : void
Parameters
- $function : SorobanAuthorizedFunction
-
the authorized function
setSubInvocations()
Sets the authorized sub-invocations.
public
setSubInvocations(array<string|int, SorobanAuthorizedInvocation> $subInvocations) : void
Parameters
- $subInvocations : array<string|int, SorobanAuthorizedInvocation>
-
the list of authorized sub-invocations
toXdr()
Converts this object to its XDR representation.
public
toXdr() : XdrSorobanAuthorizedInvocation
Return values
XdrSorobanAuthorizedInvocation —the XDR encoded invocation tree