- @services/soundtrack
Implements the Soundtrack type.
- Interface ⇐
EventEmitter
Interfaces compile abstract contract code into Chain-executable transactions, or "chaincode". For example, the "Bitcoin" interface might compile a Swap contract into Script, preparing a valid Bitcoin transaction for broadcast which executes the swap contract.
- Chain
Chain.
- State
The State is the core of most User-facing interactions. To interact with the User, simply propose a change in the state by committing to the outcome. This workflow keeps app design quite simple!
Implements the Soundtrack type.
@services/soundtrack~Soundtrack ⇐ Interface
Kind: inner class of @services/soundtrack
Extends: Interface
Create an instance of Soundtrack.
Param | Type | Description |
---|---|---|
[settings] | Object |
List of options. |
Getter for State.
Kind: instance property of Soundtrack
Start the Interface.
Kind: instance method of Soundtrack
Stop the Interface.
Kind: instance method of Soundtrack
Ticks the clock with a named Cycle.
Kind: instance method of Soundtrack
Param | Type | Description |
---|---|---|
val | String |
Name of cycle to scribe. |
Log some output to the console.
Kind: instance method of Soundtrack
Param | Type | Description |
---|---|---|
...inputs | any |
Components of the message to long. Can be a single {@link} String, many String objects, or anything else. |
Returns current timestamp.
Kind: instance method of Soundtrack
Interfaces compile abstract contract code into Chain-executable transactions, or "chaincode". For example, the "Bitcoin" interface might compile a Swap contract into Script, preparing a valid Bitcoin transaction for broadcast which executes the swap contract.
Kind: global class
Extends: EventEmitter
Properties
Name | Type | Description |
---|---|---|
status | String |
Human-friendly value representing the Interface's current State. |
- Interface ⇐
EventEmitter
Define an Interface by creating an instance of this class.
Returns: Interface
- Instance of the Interface.
Param | Type | Description |
---|---|---|
settings | Object |
Configuration values. |
Getter for State.
Kind: instance property of Interface
Start the Interface.
Kind: instance method of Interface
Stop the Interface.
Kind: instance method of Interface
Ticks the clock with a named Cycle.
Kind: instance method of Interface
Param | Type | Description |
---|---|---|
val | String |
Name of cycle to scribe. |
Log some output to the console.
Kind: instance method of Interface
Param | Type | Description |
---|---|---|
...inputs | any |
Components of the message to long. Can be a single {@link} String, many String objects, or anything else. |
Returns current timestamp.
Kind: instance method of Interface
Chain.
Kind: global class
Properties
Name | Type | Description |
---|---|---|
name | String |
Current name. |
indices | Map |
|
ledger | Ledger |
|
storage | Storage |
Holds an immutable chain of events.
Param | Type | Description |
---|---|---|
genesis | Vector |
Initial state for the chain of events. |
The State is the core of most User-facing interactions. To interact with the User, simply propose a change in the state by committing to the outcome. This workflow keeps app design quite simple!
Kind: global class
Properties
Name | Type | Description |
---|---|---|
size | Number |
Size of state in bytes. |
@buffer | Buffer |
Byte-for-byte memory representation of state. |
@type | String |
Named type. |
@data | Mixed |
Local instance of the state. |
@id | String |
Unique identifier for this data. |
- State
- new State(data)
- instance
- .toString() ⇒
String
- .serialize([input]) ⇒
Buffer
- .deserialize(input) ⇒
State
- .fork() ⇒
State
- .get(path) ⇒
Mixed
- .set(path) ⇒
Mixed
- .commit()
- .render() ⇒
String
- .toString() ⇒
- static
Creates a snapshot of some information.
Returns: State
- Resulting state.
Param | Type | Description |
---|---|---|
data | Mixed |
Input data. |
Unmarshall an existing state to an instance of a Blob.
Kind: instance method of State
Returns: String
- Serialized Blob.
Convert to Buffer.
Kind: instance method of State
Returns: Buffer
- Store-able blob.
Param | Type | Description |
---|---|---|
[input] | Mixed |
Input to serialize. |
state.deserialize(input) ⇒ State
Take a hex-encoded input and convert to a State object.
Kind: instance method of State
Returns: State
- [description]
Param | Type | Description |
---|---|---|
input | String |
[description] |
state.fork() ⇒ State
Creates a new child State, with @parent
set to
the current State by immutable identifier.
Kind: instance method of State
Retrieve a key from the State.
Kind: instance method of State
Param | Type | Description |
---|---|---|
path | Path |
Key to retrieve. |
Set a key in the State to a particular value.
Kind: instance method of State
Param | Type | Description |
---|---|---|
path | Path |
Key to retrieve. |
Increment the vector clock, broadcast all changes as a transaction.
Kind: instance method of State
Compose a JSON string for network consumption.
Kind: instance method of State
Returns: String
- JSON-encoded String.
State.fromJSON(input) ⇒ State
Marshall an input into an instance of a State. States have absolute authority over their own domain, so choose your States wisely.
Kind: static method of State
Returns: State
- Resulting instance of the State.
Param | Type | Description |
---|---|---|
input | String |
Arbitrary input. |