SorobanDelegateSignature
in package
Delegate signature node for a Soroban WITH_DELEGATES authorization entry (Protocol 27, CAP-71).
Each node carries the delegate address, a signature value (void XdrSCVal when unsigned), and an optional list of further nested delegates. The address is stored as XdrSCAddress so it can be XDR-encoded for sorting and comparison without a round-trip through strkey.
Invariants:
- $nestedDelegates must be sorted ascending by the complete XDR-encoded bytes of each node's $address before encoding; no duplicates within one array.
- $signature is an XdrSCVal::forVoid() when unsigned; callers append signatures via SorobanAuthorizationEntry::sign().
- This type is not idempotent: signing the same node twice with the same key appends a duplicate that the host will reject. Callers are responsible for call order.
Tags
Table of Contents
Properties
- $address : XdrSCAddress
- $nestedDelegates : array<string|int, SorobanDelegateSignature>
- $signature : XdrSCVal
Methods
- __construct() : mixed
- fromXdr() : SorobanDelegateSignature
- Creates a SorobanDelegateSignature from its XDR representation.
- getAddress() : XdrSCAddress
- Returns the address of this delegate node.
- getNestedDelegates() : array<string|int, SorobanDelegateSignature>
- Returns the nested delegates array.
- getSignature() : XdrSCVal
- Returns the signature value.
- setAddress() : void
- Sets the address of this delegate node.
- setNestedDelegates() : void
- Sets the nested delegates array.
- setSignature() : void
- Sets the signature value.
- toXdr() : XdrSorobanDelegateSignature
- Converts this delegate signature to its XDR representation.
Properties
$address
public
XdrSCAddress
$address
the address of this delegate node
$nestedDelegates
public
array<string|int, SorobanDelegateSignature>
$nestedDelegates
sorted nested delegate nodes, empty if none
$signature
public
XdrSCVal
$signature
signature value; void (XdrSCVal::forVoid()) when unsigned
Methods
__construct()
public
__construct(XdrSCAddress $address[, XdrSCVal|null $signature = null ][, array<string|int, SorobanDelegateSignature> $nestedDelegates = [] ]) : mixed
Parameters
- $address : XdrSCAddress
-
the delegate address
- $signature : XdrSCVal|null = null
-
signature or null for void
- $nestedDelegates : array<string|int, SorobanDelegateSignature> = []
-
nested delegates (already sorted)
fromXdr()
Creates a SorobanDelegateSignature from its XDR representation.
public
static fromXdr(XdrSorobanDelegateSignature $xdr) : SorobanDelegateSignature
Parameters
- $xdr : XdrSorobanDelegateSignature
-
the XDR delegate signature to decode
Return values
SorobanDelegateSignature —the decoded delegate signature
getAddress()
Returns the address of this delegate node.
public
getAddress() : XdrSCAddress
Return values
XdrSCAddress —the delegate address
getNestedDelegates()
Returns the nested delegates array.
public
getNestedDelegates() : array<string|int, SorobanDelegateSignature>
Return values
array<string|int, SorobanDelegateSignature> —the nested delegate nodes
getSignature()
Returns the signature value.
public
getSignature() : XdrSCVal
Return values
XdrSCVal —the signature (void when unsigned)
setAddress()
Sets the address of this delegate node.
public
setAddress(XdrSCAddress $address) : void
Parameters
- $address : XdrSCAddress
-
the delegate address
setNestedDelegates()
Sets the nested delegates array.
public
setNestedDelegates(array<string|int, SorobanDelegateSignature> $nestedDelegates) : void
Parameters
- $nestedDelegates : array<string|int, SorobanDelegateSignature>
-
the nested delegate nodes
setSignature()
Sets the signature value.
public
setSignature(XdrSCVal $signature) : void
Parameters
- $signature : XdrSCVal
-
the signature data
toXdr()
Converts this delegate signature to its XDR representation.
public
toXdr() : XdrSorobanDelegateSignature
Return values
XdrSorobanDelegateSignature —the XDR representation