Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options: RemoteCausalTreePartitionOptions,
user: User,
config: RemoteCausalTreePartitionConfig
) {
this._treeName = config.treeName;
this._user = user;
this._treeOptions = options.treeOptions || {};
let url = new URL(options.defaultHost);
this._socketManager = new SocketManager(
config.host
? `${url.protocol}//${config.host}`
: options.defaultHost
);
this._treeManager = new CausalTreeManager(
this._socketManager,
auxCausalTreeFactory(),
options.store,
options.crypto
);
}
constructor(defaultHost: string, config: AuxConfig) {
this._config = config;
this._subs = [];
let url = new URL(defaultHost);
this._socketManager = new SocketManager(
config.host ? `${url.protocol}//${config.host}` : defaultHost
);
this._treeManager = new CausalTreeManager(
this._socketManager.socket,
auxCausalTreeFactory(),
new NullCausalTreeStore()
);
}