initSync

Warning

This is a convenience function provided for quick debugging/prototyping if you don’t have top-level await available. Prefer init.

initSync()
initSync(url)
initSync(options)

Synchronous version of init. Takes exactly the same argument forms and options – see init for the full list.

Return type:

object – an object whose properties are the loaded dcp/* modules (compute, wallet, worker, protocol, identity, jnu, etc.).

Note

As with init, there is no positional autoUpdate/bundleLocation form – pass { autoUpdate, bundleLocation, ... } as a single options object instead.

Example:

const { initSync } = require('dcp-client');

const dcp = initSync();

/* DCP App ... */