tt library

Support for doing something awesome.

More dartdocs go here.

Classes

CallBacksMap
CrdtOption
DefaultGraphMergePort
DefaultGraphReplicationAdapter
Simple replication adapter that wires change notifications and can apply inbound diffs to the backing store using the merge port.
DefaultGraphTransportAdapter
Adapter that wraps an existing TTGraphConnector behind GraphTransportPort.
DefaultTTClientFactory
DefaultTTConnectorFactory
DioHttpClient
FbblCryptoPort
GenericCustomList<T extends int>
GenericCustomValueMap<K, V>
Custom Map Base Key, Value
GraphMergePort
GraphReadOptions
GraphReplicationPort
GraphStorePort
CRUD-focused graph storage operations.
GraphTransportEvents
GraphTransportPort
Abstraction over graph transport wiring so TTGraph does not depend on concrete connector types.
HiveGraphStoreAdapter
Hive-backed GraphStorePort adapter.
HiveStoragePort
InitStorage
PathData
PrintLogger
Minimal logger that mirrors the current behaviour (developer log output).
SystemClock
Default wall-clock implementation using UTC time.
TTClient
Main entry point for working with TT graphs and remote peers.
TTClientFactory
Factory for constructing TTClient instances.
TTClock
Abstraction over time sources to unlock deterministic testing.
TTConnectorFactory
Factory responsible for producing graph connectors used by the client.
TTCryptoPort
Encapsulates crypto/FFI helpers so they can be stubbed in tests.
TTEvent<T, U, V>
Generic event/listener system
TTGet
Envelope for graph read requests sent to TT connectors.
TTGraph
In-memory graph: holds node state, runs read/write middleware, merges via the GraphMergePort, and fans data to transports. Transport, query and path-write operations live in the part extensions.
TTGraphAdapter
TTGraphConnector
TTGraphConnectorEventType
TTGraphConnectorFromAdapter
TTGraphData
TT graph data consists of one or more full or partial nodes
TTGraphEvent
TTGraphNode
TTGraphNodeMap
TTGraphOptions
TTGraphWireConnector
TTHttpClient
TTHttpRequest
TTHttpResponse
TTLinkOptions
Per-link configuration hooks.
TTLogger
Logger abstraction to keep TipTool free of direct print usage.
TTMsg
A standard TT protocol message
TTMsgGet
TTNode
A node (or partial node data) in a TT graph
TTNodeMeta
Soul and state metadata for a TT node
TTNodeSerializationPort
TTNodeState
Timestamp of last change for each attribute
TTOptions
Configuration values shared across the TipTool client.
TTPut
Envelope for graph updates sent to TT connectors.
TTSerializationPort<T>
Generic serialization contract for TipTool domain objects.
TTStoragePort
Storage abstraction that mirrors the existing Hive-based behaviour.
TTTransportPort
Port that can create connectors for graph transport.
Tuple<T1, T2>
Custom tuple
WebSocketGraphConnector
WebSocketTransportAdapter
Adapter that produces WebSocket-backed graph connectors via the transport port.

Enums

MutableEnum
TTHttpMethod
Supported HTTP methods for TipTool adapters.
TTMiddlewareType

Extensions

TTGraphQuery on TTGraph
Read paths: soul requests, path queries and soul resolution for TTGraph.
TTGraphTransports on TTGraph
Transport wiring and middleware registration for TTGraph.
TTGraphWrite on TTGraph
Path-addressed writes for TTGraph: expands a deep path + value into a soul-keyed graph and submits it through TTGraph.put.
TTLinkLegacy on TTLink
Deprecated GUN-style aliases and not-yet-supported traversal stubs, kept on an extension so the core TTLink surface stays focused. Prefer the modern publish / snapshot / subscribe / unsubscribe API.

Properties

storageInitializer StorageInitializer?
getter/setter pair
storageOpenChecker StorageOpenCheck?
getter/setter pair

Functions

addMissingState(TTGraphData graphData) TTGraphData
applyBlindScale(List<int> encodedValues, double blindScale) Future<List<double>>
createDefaultClock() TTClock
createDefaultCryptoPort() TTCryptoPort
createDefaultHttpClient({TTLogger? logger}) TTHttpClient
createDefaultLogger() TTLogger
Factory helper to mirror existing logging behaviour without new singletons.
createDefaultNodeSerializationPort() TTSerializationPort<TTNode>
createDefaultStoragePort() TTStoragePort
createDefaultTransportPort({TTLogger? logger}) TTTransportPort
decodeScale(int value, String assetType) Future<double>
diffSets(List<String> initial, List<String> updated) List<List<String>>
diffTTCRDT(TTGraphData updatedGraph, TTGraphData existingGraph, {CrdtOption? opts}) TTGraphData?
encodeScale(double value, String assetType) Future<int>
flattenGraphData(GraphMergePort mergePort, TTGraphData data) TTGraphData
generateBlindScale(String assetType) Future<double>
generateMessageId() String
getBlindScale(String assetType) Future<int>
getPathData(List<String> keys, TTGraphData graph) PathData
getStoreData(TTGraphData graph, [num activeConnectors = 0]) TTGraphData
httpResponseBytes(dynamic data) Uint8List?
Optional helper for adapters requiring raw payload access.
initializeTTStore({Uint8List? encryptionKeyUint8List, String? key, String? accountKey}) Future<void>
isArray(Object? node) bool
isMap(Object? node) bool
isNull(Object? node) bool
isObject(Object? node) bool
mergeGraph(TTGraphData existing, TTGraphData diff, {MutableEnum mut = MutableEnum.immutable}) TTGraphData
mergeTTNodes(TTNode? existing, TTNode? updates, {MutableEnum mut = MutableEnum.immutable}) TTNode?
nodeToGraph(TTNode node, GraphMergePort mergePort) TTGraphData
noop() Null
revertBlindScale(List<double> blindValues, double blindScale) Future<List<int>>
setStoreData(TTGraphData graph) TTGraphData

Typedefs

ChangeSetEntry = Tuple<String, TTGraphData>
ChangeSetEntryFunc = Future<ChangeSetEntry?> Function()
EventCb<T, U, V> = FutureOr<void> Function(T a, [U? b, V? c])
FutureDoubleDecoder = Future<double> Function(int value, String assetType)
FutureIntEncoder = Future<int> Function(double value, String assetType)
FutureIntResolver = Future<int> Function(String assetType)
FutureOrStringFunc = FutureOr<String> Function(List<String> path)
GraphConnectorFuncType = void Function(GraphTransportPort transport)
LexicalFunc = dynamic Function(TTValue x)
SetChangeSetEntryFunc = void Function(ChangeSetEntry change)
StorageInitializer = Future<void> Function({Uint8List? encryptionKeyUint8List, String? key})
Function signature for initializing the storage backend.
StorageOpenCheck = bool Function()
Function signature for checking whether the storage backend is open.
TTGetOpts = GraphReadOptions
TTMiddleware = FutureOr<TTGraphData?> Function(TTGraphData updates, TTGraphData existingGraph)
TTMsgCb = void Function(TTMsg msg)
TTNodeListenCb = EventCb<TTNode?, dynamic, dynamic>
TTOnCb = EventCb<dynamic, String?, dynamic>
TTValue = dynamic
UpdateGraphFunc = void Function(TTGraphData data, [String? id, String? replyToId])
UUIDFuncType = FutureOr<String> Function(List<String> path)
VoidCallback = void Function()

Exceptions / Errors

TTHttpException