Skip to main content

iota_sdk.types.client_options

Duration Objects

@dataclass
class Duration()

Time duration.

MqttBrokerOptions Objects

@dataclass
class MqttBrokerOptions()

Options for the MQTT broker.

Attributes:

automaticDisconnect (bool): Whether the MQTT broker should be automatically disconnected when all topics are unsubscribed or not. timeout (Duration): Sets the timeout used for the MQTT operations. useWs (bool): Sets the use_ws used for the MQTT operations. port (int): Sets the port used for the MQTT operations. maxReconnectionAttempts (int): Sets the maximum number of reconnection attempts. 0 is unlimited.

ClientOptions Objects

@dataclass
class ClientOptions()

Client options.

Attributes:

primary_node (str): Node which will be tried first for all requests. primary_pow_node (str): Node which will be tried first when using remote PoW, even before the primary_node. nodes (List[str]): Array of Node URLs. permanode (str): Permanode URL. ignoreNodeHealth (bool): If the node health should be ignored. nodeSyncInterval (Duration): Interval in which nodes will be checked for their sync status and the NetworkInfo gets updated. quorum (bool): If node quorum is enabled. Will compare the responses from multiple nodes and only returns the response if quorum_threshold% of the nodes return the same one. minQuorumSize (int): Minimum amount of nodes required for request when quorum is enabled. quorumThreshold (int): % of nodes that have to return the same response so it gets accepted. userAgent (str): The User-Agent header for requests. brokerOptions (MqttBrokerOptions): Options for the MQTT broker. protocolParameters (NodeInfoProtocol): Protocol parameters. localPow (bool): Local proof of work. fallbackToLocalPow (bool): Fallback to local proof of work if the node doesn't support remote PoW. tipsInterval (int): Tips request interval during PoW in seconds. apiTimeout (Duration): Timeout for API requests. remotePowTimeout (Duration): Timeout when sending a block that requires remote proof of work. powWorkerCount (int): The amount of threads to be used for proof of work. maxParallelApiRequests (int): The maximum parallel API requests.