Class: Fabric

Fabric(config)

new Fabric(config)

The module:Fabric type implements the Fabric Protocol, a formally-defined language for the establishment and settlement of mutually-agreed upon proofs of work. Utilizing
Parameters:
Name Type Description
config Vector Initial configuration for the Fabric engine. This can be considered the "genesis" state for any contract using the system. If a chain of events is maintained over long periods of time, `state` can be considered "in contention", and it is demonstrated that the outstanding value of the contract remains to be settled.
Source:
Fires:
  • Fabric#event:thread
  • Fabric#event:step Emitted on a `compute` step.

Methods

bootstrap(vector, notify)

Consume an application definition (configure resources + services)
Parameters:
Name Type Description
vector object Object representation of the application definition.
notify function Callback function (err, result)
Source:

render() → {String}

Serialize the current network state and provide it as output.
Source:
Returns:
Serialized output for consumption.
Type
String

trust(source) → {Fabric}

Blindly consume messages from a `source`, relying on `Chain` to verify.
Parameters:
Name Type Description
source EventEmitter Any object which implements the `EventEmitter` pattern.
Source:
Returns:
Returns itself.
Type
Fabric