Stellar PHP SDK API Documentation

AccountSignerResponse

Represents a single signer configured on an account

Signers are additional keys that can authorize transactions for an account. Each signer has a weight that contributes to meeting the account's threshold requirements for operations. Multiple signers enable multi-signature functionality for enhanced security.

Signer types:

  • ed25519_public_key: Standard Stellar public key (G...)
  • sha256_hash: Hash preimage signer (X...)
  • preauth_tx: Pre-authorized transaction hash (T...)

This response is included in AccountResponse as part of the signers array.

Tags
see
AccountResponse

For the parent account details

AccountThresholdsResponse

For threshold requirements

https://developers.stellar.org

Stellar developer docs Multi-Signature Documentation

since
1.0.0

Table of Contents

Methods

fromJson()  : AccountSignerResponse
Creates an AccountSignerResponse instance from JSON data
getKey()  : string
Gets the signer's public key or hash
getSponsor()  : string|null
Gets the sponsor account ID for this signer entry
getType()  : string
Gets the signer type
getWeight()  : int
Gets the signer's weight
loadFromJson()  : void

Methods

fromJson()

Creates an AccountSignerResponse instance from JSON data

public static fromJson(array<string|int, mixed> $json) : AccountSignerResponse
Parameters
$json : array<string|int, mixed>

The JSON array containing signer data from Horizon

Return values
AccountSignerResponse —

The parsed signer response

getKey()

Gets the signer's public key or hash

public getKey() : string

Format depends on the signer type (G... for ed25519, X... for hash, T... for preauth).

Return values
string —

The signer key

getSponsor()

Gets the sponsor account ID for this signer entry

public getSponsor() : string|null
Return values
string|null —

The sponsor account ID, or null if not sponsored

getType()

Gets the signer type

public getType() : string

Possible values: ed25519_public_key, sha256_hash, preauth_tx

Return values
string —

The signer type

getWeight()

Gets the signer's weight

public getWeight() : int

The weight contributes to meeting threshold requirements for authorizing operations.

Return values
int —

The signer weight (0-255)

loadFromJson()

protected loadFromJson(array<string|int, mixed> $json) : void
Parameters
$json : array<string|int, mixed>
On this page

Search results