SorobanAddressCredentialsWithDelegates
in package
Address credentials with a delegate tree for Soroban WITH_DELEGATES authorization (Protocol 27, CAP-71).
This is the hand-written wrapper for the ADDRESS_WITH_DELEGATES credential arm. It pairs the top-level SorobanAddressCredentials (address, nonce, signatureExpirationLedger, signature) with a sorted array of SorobanDelegateSignature nodes that can authorize the same entry.
Invariants:
- $delegates must be sorted ascending by the complete XDR-encoded bytes of each delegate's XdrSCAddress before submission; no duplicates within this array.
- The top-level $addressCredentials carries the nonce and signatureExpirationLedger. Delegate nodes carry neither.
- An empty $delegates array is structurally valid and behaves like ADDRESS_V2.
Tags
Table of Contents
Properties
- $addressCredentials : SorobanAddressCredentials
- $delegates : array<string|int, SorobanDelegateSignature>
Methods
- __construct() : mixed
- fromXdr() : SorobanAddressCredentialsWithDelegates
- Creates a SorobanAddressCredentialsWithDelegates from its XDR representation.
- getAddressCredentials() : SorobanAddressCredentials
- Returns the top-level address credentials.
- getDelegates() : array<string|int, SorobanDelegateSignature>
- Returns the delegate nodes array.
- setAddressCredentials() : void
- Sets the top-level address credentials.
- setDelegates() : void
- Sets the delegate nodes array.
- toXdr() : XdrSorobanAddressCredentialsWithDelegates
- Converts this object to its XDR representation.
Properties
$addressCredentials
public
SorobanAddressCredentials
$addressCredentials
top-level credentials carrying address, nonce, expiration, and top-level signature
$delegates
public
array<string|int, SorobanDelegateSignature>
$delegates
top-level delegate nodes, sorted by XDR-encoded address bytes
Methods
__construct()
public
__construct(SorobanAddressCredentials $addressCredentials[, array<string|int, SorobanDelegateSignature> $delegates = [] ]) : mixed
Parameters
- $addressCredentials : SorobanAddressCredentials
-
the top-level address credentials
- $delegates : array<string|int, SorobanDelegateSignature> = []
-
delegate signature nodes (must be sorted)
fromXdr()
Creates a SorobanAddressCredentialsWithDelegates from its XDR representation.
public
static fromXdr(XdrSorobanAddressCredentialsWithDelegates $xdr) : SorobanAddressCredentialsWithDelegates
Parameters
- $xdr : XdrSorobanAddressCredentialsWithDelegates
-
the XDR object to decode
Return values
SorobanAddressCredentialsWithDelegates —the decoded object
getAddressCredentials()
Returns the top-level address credentials.
public
getAddressCredentials() : SorobanAddressCredentials
Return values
SorobanAddressCredentials —the top-level credentials
getDelegates()
Returns the delegate nodes array.
public
getDelegates() : array<string|int, SorobanDelegateSignature>
Return values
array<string|int, SorobanDelegateSignature> —the delegate nodes
setAddressCredentials()
Sets the top-level address credentials.
public
setAddressCredentials(SorobanAddressCredentials $addressCredentials) : void
Parameters
- $addressCredentials : SorobanAddressCredentials
-
the top-level credentials
setDelegates()
Sets the delegate nodes array.
public
setDelegates(array<string|int, SorobanDelegateSignature> $delegates) : void
Parameters
- $delegates : array<string|int, SorobanDelegateSignature>
-
the delegate nodes
toXdr()
Converts this object to its XDR representation.
public
toXdr() : XdrSorobanAddressCredentialsWithDelegates
Return values
XdrSorobanAddressCredentialsWithDelegates —the XDR representation