TezosNodeClientConfig

public struct TezosNodeClientConfig

A configuration object used to provide settings to the TezosNodeClient

Types

  • An enum indicating whether the network is mainnet or testnet

    See more

    Declaration

    Swift

    public enum NetworkType : String
  • Allow switching between local forging or remote forging+parsing

    See more

    Declaration

    Swift

    public enum ForgingType : String

Public Constants

  • Preconfigured struct with all the URL’s needed to work with Tezos mainnet

    See more

    Declaration

    Swift

    public struct defaultMainnetURLs
  • Preconfigured struct with all the URL’s needed to work with Tezos testnet

    See more

    Declaration

    Swift

    public struct defaultGhostnetURLs

Public Properties

  • An array of Node URLs. Default to first, and fallback to rest one by one to attempt to avoid server side issues

    Declaration

    Swift

    public let nodeURLs: [URL]
  • Controls whether to use local forging or remote forging+parsing

    Declaration

    Swift

    public let forgingType: ForgingType
  • The URL to use for TzKTClient

    Declaration

    Swift

    public let tzktURL: URL
  • The URL to use for BetterCallDevClient

    Declaration

    Swift

    public let betterCallDevURL: URL
  • The URL to use for TezosDomainsClient

    Declaration

    Swift

    public let tezosDomainsURL: URL
  • The URL to use for TezosDomainsClient

    Declaration

    Swift

    public let objktApiURL: URL
  • The URLSession that will be used for all network communication. If looking to mock this library, users should create their own URLSessionMock and pass it in.

    Declaration

    Swift

    public var urlSession: URLSession
  • The network type of the connected node

    Declaration

    Swift

    public let networkType: NetworkType
  • Control what gets logged to the console

    Declaration

    Swift

    public var loggingConfig: LoggingConfig

Init

  • Init a TezosNodeClientConfig with the defaults

    Declaration

    Swift

    public init(withDefaultsForNetworkType networkType: NetworkType)

    Parameters

    withDefaultsForNetworkType

    Use the default settings for the given network type

  • Creates an instance of TezosNodeClientConfig with only the required properties needed when using local forge.

    Declaration

    Swift

    public static func configWithLocalForge(nodeURLs: [URL], tzktURL: URL, betterCallDevURL: URL, tezosDomainsURL: URL, objktApiURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig

    Parameters

    nodeURLs

    An array of URLs to use to estiamte and inject operations. Default to first and fallback to others as needed

    tzktURL

    The URL to use for TzKTClient.

    betterCallDevURL

    The URL to use for BetterCallDevClient.

    urlSession

    The URLSession object that will perform all the network operations.

    networkType

    Enum indicating the network type.

  • Creates an instance of TezosNodeClientConfig with the required properties for remote forging. Note: function will casue a fatalError if supplied with less than 2 nodeURLs

    Declaration

    Swift

    public static func configWithRemoteForge(nodeURLs: [URL], parseNodeURL: URL, tzktURL: URL, betterCallDevURL: URL, tezosDomainsURL: URL, objktApiURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig

    Parameters

    nodeURLs

    An array of URLs to use to estiamte and inject operations. Default to first and fallback to others as needed

    tzktURL

    The URL to use for TzKTClient.

    betterCallDevURL

    The URL to use for BetterCallDevClient.

    urlSession

    The URLSession object that will perform all the network operations.

    networkType

    Enum indicating the network type.