SorobanContractInfo

public final class SorobanContractInfo : Sendable

Stores information parsed from a soroban contract byte code such as Environment Meta, Contract Spec Entries and Contract Meta Entries. See also: Stellar developer docs

  • Environment interface version the contract was compiled against.

    Declaration

    Swift

    public let envInterfaceVersion: UInt64
  • Raw contract specification entries defining types, functions, and events.

    Declaration

    Swift

    public let specEntries: [SCSpecEntryXDR]
  • Key-value metadata entries from the contract’s custom section.

    Declaration

    Swift

    public let metaEntries: [String : String]
  • List of SEPs (Stellar Ecosystem Proposals) supported by the contract. Extracted from the “sep” meta entry as defined in SEP-47.

    Declaration

    Swift

    public let supportedSeps: [String]
  • Contract functions extracted from spec entries. Contains all function specifications exported by the contract.

    Declaration

    Swift

    public let funcs: [SCSpecFunctionV0XDR]
  • User-defined type structs extracted from spec entries. Contains all UDT struct specifications exported by the contract.

    Declaration

    Swift

    public let udtStructs: [SCSpecUDTStructV0XDR]
  • User-defined type unions extracted from spec entries. Contains all UDT union specifications exported by the contract.

    Declaration

    Swift

    public let udtUnions: [SCSpecUDTUnionV0XDR]
  • User-defined type enums extracted from spec entries. Contains all UDT enum specifications exported by the contract.

    Declaration

    Swift

    public let udtEnums: [SCSpecUDTEnumV0XDR]
  • User-defined type error enums extracted from spec entries. Contains all UDT error enum specifications exported by the contract.

    Declaration

    Swift

    public let udtErrorEnums: [SCSpecUDTErrorEnumV0XDR]
  • Event specifications extracted from spec entries. Contains all event specifications exported by the contract.

    Declaration

    Swift

    public let events: [SCSpecEventV0XDR]
  • Creates contract info from environment interface version, spec entries, and metadata entries.

    Declaration

    Swift

    public init(envInterfaceVersion: UInt64, specEntries: [SCSpecEntryXDR], metaEntries: [String : String])