AccountThresholdsResponse
in package
Represents the signature threshold levels for an account
Thresholds determine the combined weight required from signers to authorize operations of different security levels. Each operation type is assigned to low, medium, or high threshold.
Threshold levels:
- Low: Used for AllowTrust, BumpSequence operations
- Medium: Used for all other operations except SetOptions
- High: Used for SetOptions operation to change thresholds, signers, or master weight
This response is included in AccountResponse as part of the account details.
Tags
Table of Contents
Methods
- fromJson() : AccountThresholdsResponse
- Creates an AccountThresholdsResponse instance from JSON data
- getHighThreshold() : int
- Gets the high security threshold value
- getLowThreshold() : int
- Gets the low security threshold value
- getMedThreshold() : int
- Gets the medium security threshold value
- loadFromJson() : void
Methods
fromJson()
Creates an AccountThresholdsResponse instance from JSON data
public
static fromJson(array<string|int, mixed> $json) : AccountThresholdsResponse
Parameters
- $json : array<string|int, mixed>
-
The JSON array containing threshold data from Horizon
Return values
AccountThresholdsResponse —The parsed thresholds response
getHighThreshold()
Gets the high security threshold value
public
getHighThreshold() : int
SetOptions operations use this threshold to prevent unauthorized account changes.
Return values
int —The high threshold weight required (0-255)
getLowThreshold()
Gets the low security threshold value
public
getLowThreshold() : int
Operations at this level include AllowTrust and BumpSequence.
Return values
int —The low threshold weight required (0-255)
getMedThreshold()
Gets the medium security threshold value
public
getMedThreshold() : int
Most operations use this threshold level by default.
Return values
int —The medium threshold weight required (0-255)
loadFromJson()
protected
loadFromJson(array<string|int, mixed> $json) : void
Parameters
- $json : array<string|int, mixed>