StellarProtocolConstants

public struct StellarProtocolConstants : Sendable

Constants defined by the Stellar protocol specification. These values represent core protocol limits, sizes, and validation constraints used throughout the Stellar network.

Reference: Stellar developer docs

Ed25519 Cryptographic Sizes

Hash Sizes

StrKey Encoding Structure

StrKey Encoded String Lengths

StrKey Decoded Payload Sizes

Version Byte Encoding

Asset Code Limits

Asset Canonical Form

Memo Limits

Transaction Limits

Transaction Constants

Amount Conversion

  • Number of stroops in one XLM (1 XLM = 10,000,000 stroops).

    The stroop is the smallest indivisible unit of the native asset on the Stellar network. Reference: Stellar developer docs

    Declaration

    Swift

    public static let stroopsPerXlm: Int64

Ledger Timing

  • Average number of ledgers closed per hour on the Stellar network.

    The Stellar network targets a five-second ledger close interval, which yields 3600 / 5 = 720 ledgers per hour. Actual close times vary; use this value only for approximate time-based period calculations.

    Declaration

    Swift

    public static let ledgersPerHour: Int
  • Average number of ledgers closed per day on the Stellar network.

    Derived from ledgersPerHour * 24 = 17,280. Actual close times vary; use this value only for approximate time-based period calculations.

    Declaration

    Swift

    public static let ledgersPerDay: Int

Signed Payload

Signature Hint

ManageData Operation

SetOptions Thresholds

Claimable Balance

Liquidity Pool

StrKey Prefixes