+
+
+
+
+
+
+
+
new Contract()
+
+
+
+
+
+
+
+ Service-backed agreement template: DOT graphs, a derived circuit structure, deploy/genesis/publish flows,
+ and JSON-Patch–observed commits. Specialized by
Bond,
Federation, and Distribution.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Extends
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+
+
+
+ (async) _GET(path) → {Promise}
+
+
+
+
+
+
+
+ Retrieve a value from the Service's state.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ path |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+ Path of the value to retrieve. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Resolves with the result.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) _PUT(path, value, commitopt) → {Promise}
+
+
+
+
+
+
+
+ Store a value in the Service's state.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ path |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Path to store the value at. |
+
+
+
+
+
+
+ value |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ Document to store. |
+
+
+
+
+
+
+ commit |
+
+
+
+
+
+ Boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ Sign the resulting state. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Resolves with with stored document.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _appendWarning(msg) → {Service}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ msg |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+ Warning text (used by Service#_registerService duplicate guard). |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ This instance.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _readObject(input) → {Object}
+
+
+
+
+
+
+
+ Parse an Object into a corresponding Fabric state.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ input |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+
+ Object to read as input. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Fabric state.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) _registerActor(actor) → {Promise}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ actor |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+
+ Instance of the Actor. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Resolves upon successful registration.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) _send(message)
+
+
+
+
+
+
+
+ Sends a message.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ message |
+
+
+
+
+
+ Mixed
+
+
+
+ |
+
+
+
+
+
+ Message to send. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Shared spend-policy inputs for #toTaprootContract.
+ Subclasses (e.g. Federation) may override to supply validators from state.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ overrides |
+
+
+
+
+
+ object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adopt(changes) → {Actor}
+
+
+
+
+
+
+
+ Explicitly adopt a set of JSONPatch-encoded changes.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ changes |
+
+
+
+
+
+ Array
+
+
+
+ |
+
+
+
+
+
+ List of JSONPatch operations to apply. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Instance of the Actor.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Actor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Compute latest state.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Fires:
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ commit() → {String}
+
+
+
+
+
+
+
+ Resolve the current state to a commitment.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Overrides:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ 32-byte ID
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) connect(notify) → {Promise}
+
+
+
+
+
+
+
+ Attach to network.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ notify |
+
+
+
+
+
+ Boolean
+
+
+
+ |
+
+
+
+
+
+
+ true
+
+ |
+
+
+ Commit to changes. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ defineBitcoinOpcode(name, definitionopt) → {Object}
+
+
+
+
+
+
+
+ Register Bitcoin-style primitive opcode metadata.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ definition |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ defineFabricOpcode(name, definitionopt) → {Object}
+
+
+
+
+
+
+
+ Register Fabric opcode metadata.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+ definition |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ defineOpcode(name, definitionopt) → {Object}
+
+
+
+
+
+
+
+ Register a single opcode entry in the service registry.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Opcode symbol (e.g. `OP_SHA256`, `P2P_FLUSH_CHAIN`) |
+
+
+
+
+
+
+ definition |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ defineOpcodeContract(name, body, metaopt) → {Object}
+
+
+
+
+
+
+
+ Register a newline-delimited opcode contract.
+ Contract body example:
+ `OP_DUP\nOP_HASH160\nP2P_FLUSH_CHAIN`
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ name |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Contract label |
+
+
+
+
+
+
+ body |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ Newline-delimited opcode list |
+
+
+
+
+
+
+ meta |
+
+
+
+
+
+ Object
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ deploy() → {String}
+
+
+
+
+
+
+
+ Deploys the contract.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Message ID.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ export() → {Object}
+
+
+
+
+
+
+
+ Export the Actor's state to a standard Object.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Standard object.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ get(path) → {Mixed}
+
+
+
+
+
+
+
+ Retrieve a key from the
State.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ path |
+
+
+
+
+
+ Path
+
+
+
+ |
+
+
+
+
+
+ Key to retrieve. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Returns the target value if found, otherwise null.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Mixed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ handler(message) → {Service}
+
+
+
+
+
+
+
+ Default route handler for an incoming message. Follows the Activity
+ Streams 2.0 spec: https://www.w3.org/TR/activitystreams-core/
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ message |
+
+
+
+
+
+ Activity
+
+
+
+ |
+
+
+
+
+
+ Message object. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Chainable method.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ init()
+
+
+
+
+
+
+
+ Called by Web Components.
+ TODO: move to @fabric/http/types/spa
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ listOpcodes() → {Array.<Object>}
+
+
+
+
+
+
+
+ Snapshot opcode registry for UI / API use.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Array.<Object>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lock(durationopt) → {Boolean}
+
+
+
+
+
+
+
+ Attempt to acquire a lock for `duration` seconds.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ duration |
+
+
+
+
+
+ Number
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 1000
+
+ |
+
+
+ Number of milliseconds to hold lock. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ true if locked, false if unable to lock.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Boolean
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ pause() → {Actor}
+
+
+
+
+
+
+
+ Toggles `status` property to paused.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Instance of the Actor.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Actor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) route(msg) → {Promise}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ msg |
+
+
+
+
+
+ Message
+
+
+
+ |
+
+
+
+
+
+ Explicit Fabric Message. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Resolves with resulting
State.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Promise
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ (async) send(channel, message) → {Service}
+
+
+
+
+
+
+
+ Send a message to a channel.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ channel |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+ Channel name to which the message will be sent. |
+
+
+
+
+
+
+ message |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+ Content of the message to send. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Chainable method.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ serialize() → {String}
+
+
+
+
+
+
+
+ Serialize the Actor's current state into a JSON-formatted string.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ String
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ set(path) → {Mixed}
+
+
+
+
+
+
+
+ Set a key in the
State to a particular value.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ path |
+
+
+
+
+
+ Path
+
+
+
+ |
+
+
+
+
+
+ Key to retrieve. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Mixed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ sign() → {Actor}
+
+
+
+
+
+
+
+ Signs the Actor.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Actor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Start the Contract.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Overrides:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ State "STARTED" iteration of the Contract.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Contract
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ stream(pipeopt) → {TransformStream}
+
+
+
+
+
+
+
+ Returns a new output stream for the Actor.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ pipe |
+
+
+
+
+
+ TransformStream
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ Pipe to stream to. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ New output stream for the Actor.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ TransformStream
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ tick() → {Number}
+
+
+
+
+
+
+
+ Move forward one clock cycle.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Number
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toAddress(networkopt) → {string}
+
+
+
+
+
+
+
+ Bech32m P2TR address for this contract's spend policy.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ network |
+
+
+
+
+
+ string
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ string
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toBuffer() → {Buffer}
+
+
+
+
+
+
+
+ Casts the Actor to a normalized Buffer.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Buffer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toGenericMessage(typeopt) → {Object}
+
+
+
+
+
+
+
+ Casts the Actor to a generic message envelope for state announcements and history.
+ Shape is stable: `{ type, object }` where `object` is sorted-key state (
Actor#toObject).
+ Actor#id derives from a digest of the pretty-printed generic message; extending this
+ envelope requires a format/version migration across the network.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ type |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ 'FabricActorState'
+
+ |
+
+
+ Logical message type string. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+ - See:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ `{ type, object }`
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ toObject() → {Object}
+
+
+
+
+
+
+
+ Returns the Actor's current state as an Object.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ trust(source) → {Service}
+
+
+
+
+
+
+
+ Explicitly trust all events from a known source.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ source |
+
+
+
+
+
+ EventEmitter
+
+
+
+ |
+
+
+
+
+
+ Emitter of events. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Instance of Service after binding events.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Service
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ unpause() → {Actor}
+
+
+
+
+
+
+
+ Toggles `status` property to unpaused.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Instance of the Actor.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Actor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ value(formatopt) → {Object}
+
+
+
+
+
+
+
+ Get the inner value of the Actor with an optional cast type.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+ Attributes |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ format |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ object
+
+ |
+
+
+ Cast the value to one of: `buffer, hex, json, string` |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Inner value of the Actor as an Object, or cast to the requested `format`.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ when(event, method) → {EventEmitter}
+
+
+
+
+
+
+
+ Bind a method to an event, with current state as the immutable context.
+
+
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ | Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ event |
+
+
+
+
+
+ String
+
+
+
+ |
+
+
+
+
+
+ Name of the event upon which to execute `method` as a function. |
+
+
+
+
+
+
+ method |
+
+
+
+
+
+ function
+
+
+
+ |
+
+
+
+
+
+ Function to execute when named Event `event` is encountered. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+ Instance of EventEmitter.
+
+
+
+
+
+ -
+ Type
+
+ -
+
+ EventEmitter
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+