Class

Operate

Operate

Load and run Operate programs (known as "tapes") encoded in Bitcoin SV transactions.

Operate is a toolset to help developers build applications, games and services on top of Bitcoin (SV). It lets you write functions, called "Ops", and enables transactions to become small but powerful programs, capable of delivering new classes of services layered over Bitcoin.

Members

# static Agent

Returns the Agent class.

View Source index.js, line 68

# static config

Returns the config.

View Source index.js, line 74

# static util

Returns the util helper module.

View Source index.js, line 80

# static version

Returns version number.

View Source index.js, line 86

Methods

# static loadTape(txid, opts) → {Promise(Tape)}

Loads a tape from the given txid.

Fetches the tape transaction output as well as all of the required functions, and returns a Promise.

Any configuration option can be overridden.

Parameters:
Name Type Description
txid String

Transaction id

opts Object

Options

View Source index.js, line 31

Promise(Tape)

# static loadTapesBy(query, opts) → {Promise(Array)}

Loads a tape from the given query.

The expected format of the query will depend on the Adapter in use. The transactions as well as all required functions are loaded and a Proise is returned resolving in a list of Tapes.

Any configuration option can be overridden.

Parameters:
Name Type Description
query Object

Query object

opts Object

Options

View Source index.js, line 48

Promise(Array)

# static runTape(tape, opts) → {Promise(any)}

Runs the given tape executing each of the tape's cells and returns Tape.

Parameters:
Name Type Description
tape Tape

Tape instance

opts Object

Options

View Source index.js, line 59

Promise(any)