NativeUnionVal

public final class NativeUnionVal : @unchecked Sendable

This class is used in ContractSpec to represent native union values that need to be converted to XdrSCVal for Soroban contract invocation.

  • tag

    The tag identifying which union case is being used

    Declaration

    Swift

    public let tag: String
  • Optional array of values for tuple union cases

    Declaration

    Swift

    public let values: [Any]?
  • Initialize a NativeUnionVal for a void union case

    Declaration

    Swift

    public init(tag: String)

    Parameters

    tag

    The tag identifying the union case

  • Initialize a NativeUnionVal for a tuple union case

    Declaration

    Swift

    public init(tag: String, values: [Any])

    Parameters

    tag

    The tag identifying the union case

    values

    Array of values for the tuple case