TezosNodeClientConfig
public struct TezosNodeClientConfig
A configuration object used to provide settings to the TezosNodeClient
-
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 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(primaryNodeURL:
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(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.
-
configWithRemoteForge(primaryNodeURL:
parseNodeURL: tzktURL: betterCallDevURL: tezosDomainsURL: objktApiURL: urlSession: networkType: ) Creates an instance of
TezosNodeClientConfig
with the required properties for remote forging. Note: function will casue afatalError
is users attempt to setprimaryNodeURL
andparseNodeURL
to the same destinationDeclaration
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.