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 defaultTestnetURLs

Public Properties

  • The main URL used for remote forging, fetching balances, setting delegates and other forms of queries and operations.

    Declaration

    Swift

    public let primaryNodeURL: URL
  • When using remote forging, it is essential to use a second server to verify the contents of the remote forge match what the library sent.

    Declaration

    Swift

    public let parseNodeURL: 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(primaryNodeURL: URL, tzktURL: URL, betterCallDevURL: URL, tezosDomainsURL: URL, objktApiURL: URL, urlSession: URLSession, networkType: NetworkType) -> TezosNodeClientConfig

    Parameters

    primaryNodeURL

    The URL of the primary node that will perform the majority of the network operations.

    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 is users attempt to set primaryNodeURL and parseNodeURL to the same destination

    Declaration

    Swift

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

    Parameters

    primaryNodeURL

    The URL of the primary node that will perform the majority of the network operations.

    parseNodeURL

    The URL to use to parse and verify a remote forge. Must be a different server to primary node.

    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.