TezosNodeClientConfig
public struct TezosNodeClientConfig
A configuration object used to provide settings to the TezosNodeClient
-
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 ownURLSessionMock
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 a
TezosNodeClientConfig
with the defaultsDeclaration
Swift
public init(withDefaultsForNetworkType networkType: NetworkType)
Parameters
withDefaultsForNetworkType
Use the default settings for the given network type
-
configWithLocalForge(nodeURLs:
tzktURL: betterCallDevURL: tezosDomainsURL: objktApiURL: urlSession: networkType: ) 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.
-
configWithRemoteForge(nodeURLs:
parseNodeURL: tzktURL: betterCallDevURL: tezosDomainsURL: objktApiURL: urlSession: networkType: ) Creates an instance of
TezosNodeClientConfig
with the required properties for remote forging. Note: function will casue afatalError
if supplied with less than 2nodeURLs
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.