Node
public class Node
Node is a class that wraps a golang node object
Should not be used on its own
-
Closes this node instance
Throws
NodeError: If the closing of the node failedDeclaration
Swift
public func close() throws -
Serves node API over UDS
Throws
NodeError: If the node failed to serveDeclaration
Swift
public func serveAPI(onUDS: String) throwsParameters
onUDSThe UDS path to serve on
-
Serves node API over TCP
Throws
NodeError: If the node failed to serveDeclaration
Swift
public func serveAPI(onTCPPort: String) throws -> StringParameters
onTCPPortThe TCP port to serve on
Return Value
The TCP/IP MultiAddr the node is serving on
-
Serves node Gateway over the given Multiaddr
Throws
NodeError: If the node failed to serveDeclaration
Swift
public func serveGateway(onMultiaddr: String, writable: Bool = false) throws -> StringParameters
onMultiaddrThe multiaddr to serve on
writableIf true: will also support support
POST,PUT, andDELETEmethods. -
Serves any multiaddr (api & gateway) inside
Addresses.ApiandAddresses.Gatewayin the config (if any)Throws
NodeError: If the node failed to serveDeclaration
Swift
public func serve() throwsReturn Value
The TCP/IP MultiAddr the node is serving on
View on GitHub
Node Class Reference