Stellar PHP SDK API Documentation

SorobanAddressCredentials

Address-based credentials for Soroban authorization

This class represents address-based credentials used in Soroban authorization entries. It contains the address being authorized, a nonce for replay protection, a signature expiration ledger for time-based security, and the signature data itself.

Tags
see
SorobanCredentials
see
SorobanAuthorizationEntry
see
https://developers.stellar.org/docs/learn/smart-contract-internals/authorization

Soroban Authorization

since
1.0.0

Table of Contents

Properties

$address  : Address
$nonce  : int
$signature  : XdrSCVal
$signatureExpirationLedger  : int

Methods

__construct()  : mixed
Creates new address-based credentials for Soroban authorization.
fromXdr()  : SorobanAddressCredentials
Creates SorobanAddressCredentials from its XDR representation.
getAddress()  : Address
Returns the address being authorized.
getNonce()  : int
Returns the nonce for replay protection.
getSignature()  : XdrSCVal
Returns the signature data.
getSignatureExpirationLedger()  : int
Returns the ledger number after which the signature expires.
setAddress()  : void
Sets the address being authorized.
setNonce()  : void
Sets the nonce for replay protection.
setSignature()  : void
Sets the signature data.
setSignatureExpirationLedger()  : void
Sets the ledger number after which the signature expires.
toXdr()  : XdrSorobanAddressCredentials
Converts this object to its XDR representation.

Properties

$signatureExpirationLedger

public int $signatureExpirationLedger

ledger sequence number after which this signature expires

Methods

__construct()

Creates new address-based credentials for Soroban authorization.

public __construct(Address $address, int $nonce, int $signatureExpirationLedger, XdrSCVal $signature) : mixed
Parameters
$address : Address

the address being authorized (account or contract)

$nonce : int

unique nonce for replay protection

$signatureExpirationLedger : int

ledger number after which the signature expires

$signature : XdrSCVal

signature data (typically a vector of AccountEd25519Signature)

getNonce()

Returns the nonce for replay protection.

public getNonce() : int
Return values
int

the nonce value

getSignatureExpirationLedger()

Returns the ledger number after which the signature expires.

public getSignatureExpirationLedger() : int
Return values
int

the expiration ledger sequence number

setNonce()

Sets the nonce for replay protection.

public setNonce(int $nonce) : void
Parameters
$nonce : int

the nonce value

setSignatureExpirationLedger()

Sets the ledger number after which the signature expires.

public setSignatureExpirationLedger(int $signatureExpirationLedger) : void
Parameters
$signatureExpirationLedger : int

the expiration ledger sequence number


        
On this page

Search results