diff --git a/.nvmrc b/.nvmrc index eb800ed45..60495ee0a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.19.0 +v18.19.1 diff --git a/API.md b/API.md index 81f6b1e4a..7b654655d 100644 --- a/API.md +++ b/API.md @@ -4,13 +4,6 @@
Actor

Generic Fabric Actor.

-
Aggregator
-

Aggregates a set of balances (inputs).

-
-
AppService
-

Web-friendly application framework for building single-page applications with -Fabric-based networking and storage.

-
Chain

Chain.

@@ -26,7 +19,7 @@ service to the network.

The Circuit is the mechanism through which Fabric operates, a computable directed graph describing a network of Peer components and their interactions (side effects). -See also Swarm for deeper *inspection of Machine +See also Swarm for deeper inspection of Machine mechanics.

CLI
@@ -36,15 +29,6 @@ the Fabric network using a terminal emulator.

Collection

The Collection type maintains an ordered list of State items.

-
Compiler : Actor
-

Compilers build interfaces for users of Fabric applications.

-
-
Consensus
-

Provides various network-specific rules.

-
-
Entity : Object
-

Live instance of an ARC in Fabric.

-
Environment

Interact with the user's Environment.

@@ -73,9 +57,6 @@ RFC 5869. Defaults to 32 byte output, matching Bitcoin's implementaton.

Key

Represents a cryptographic key.

-
Keystore
-

Provides an encrypted datastore for generic object storage.

-
LedgerScribe

An ordered stack of pages.

@@ -85,25 +66,11 @@ RFC 5869. Defaults to 32 byte output, matching Bitcoin's implementaton.

Machine

General-purpose state machine with Vector-based instructions.

-
Mempool
-

Stores a list of Transaction elements.

-
Message : Object

The Message type defines the Application Messaging Protocol, or AMP. Each Actor in the network receives and broadcasts messages, selectively disclosing new routes to peers which may have open circuits.

-
Node
-

Full definition of a Fabric node.

-
-
OracleStore
-

An Oracle manages one or more collections, using a mempool for -transitive state.

-
-
Path
-

A Path is a Fabric-native link to a Document -within the network.

-
Peer

An in-memory representation of a node in our network.

@@ -118,12 +85,6 @@ be moved to @fabric/http before final release!

Resource

Generic interface for collections of digital objects.

-
RouterScribe
-

Process incoming messages.

-
-
ScribeState
-

Simple tag-based recordkeeper.

-
Script
Service
@@ -156,21 +117,12 @@ committing to the outcome. This workflow keeps app design quite simple!

Store

Long-term storage.

-
Swap : Object
-

The Swap contract executes a set of transactions on two distinct -Chain components, utilizing a secret-reveal mechanism to atomically -execute either the full set or none.

-
Swarm : String

Orchestrates a network of peers.

Token

Implements a capability-based security token.

-
Transition
-

The Transition type reflects a change from one finite -State to another.

-
Tree

Class implementing a Merkle Tree.

@@ -192,14 +144,11 @@ contract's lifetime as "fulfillment conditions" for its closure.BitcoinService

Manages interaction with the Bitcoin network.

-
Exchange
-

Implements a basic Exchange.

-
Lightning

Manage a Lightning node.

Redis
-

Connect and subscribe to ZeroMQ servers.

+

Connect and subscribe to Redis servers.

ZMQ

Connect and subscribe to ZeroMQ publishers.

@@ -425,2728 +374,1505 @@ Get a number of random bytes from the runtime environment. | --- | --- | --- | --- | | [count] | Number | 32 | Number of random bytes to retrieve. | - + -## Aggregator -Aggregates a set of balances (inputs). +## Chain +Chain. **Kind**: global class +**Properties** -* [Aggregator](#Aggregator) - * [new Aggregator([settings])](#new_Aggregator_new) - * [._importBalances(list)](#Aggregator+_importBalances) ⇒ AnchorBalance - * [._computeBalances()](#Aggregator+_computeBalances) ⇒ AnchorBalance - * [.commit()](#Aggregator+commit) ⇒ AggregatorCommit - * ["commit"](#Aggregator+event_commit) +| Name | Type | Description | +| --- | --- | --- | +| name | String | Current name. | +| indices | Map | | +| storage | Storage | | - + -### new Aggregator([settings]) -Create a new Aggregator. +### new Chain(genesis) +Holds an immutable chain of events. -**Returns**: [Aggregator](#Aggregator) - Instance of the [Aggregator](#Aggregator). | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Map of configuration values. | -| [settings.inputs] | Array | Array of [AnchorBalance](AnchorBalance) instances. | +| genesis | [Vector](#Vector) | Initial state for the chain of events. | - + + +## Channel +The [Channel](#Channel) is a encrypted connection with a member of your +[Peer](#Peer) group, with some amount of $BTC bonded and paid for each +correctly-validated message. -### aggregator.\_importBalances(list) ⇒ AnchorBalance -Import a list of [AnchorBalance](AnchorBalance) instances. +Channels in Fabric are powerful tools for application development, as they +can empower users with income opportunities in exchange for delivering +service to the network. -**Kind**: instance method of [Aggregator](#Aggregator) -**Returns**: AnchorBalance - Summary of resulting balances. +**Kind**: global class -| Param | Type | Description | -| --- | --- | --- | -| list | Array | List of inputs to add. | +* [Channel](#Channel) + * [new Channel([settings])](#new_Channel_new) + * [.add(amount)](#Channel+add) + * [.fund(input)](#Channel+fund) + * [.open(channel)](#Channel+open) - + -### aggregator.\_computeBalances() ⇒ AnchorBalance -Updates the state to reflect balances from current inputs. +### new Channel([settings]) +Creates a channel between two peers. +of many transactions over time, to be settled on-chain later. -**Kind**: instance method of [Aggregator](#Aggregator) -**Returns**: AnchorBalance - Summary of balances. - -### aggregator.commit() ⇒ AggregatorCommit -Commits the balance of all input. +| Param | Type | Description | +| --- | --- | --- | +| [settings] | Object | Configuration for the channel. | -**Kind**: instance method of [Aggregator](#Aggregator) -**Returns**: AggregatorCommit - Commit instance. -**Emits**: [commit](#Aggregator+event_commit) - + -### "commit" -Commit event. +### channel.add(amount) +Add an amount to the channel's balance. -**Kind**: event emitted by [Aggregator](#Aggregator) -**Properties** +**Kind**: instance method of [Channel](#Channel) -| Name | Type | Description | +| Param | Type | Description | | --- | --- | --- | -| root | Uint8Array | Root of the [Tree](#Tree). | -| leaves | Array | Leaves of the [Tree](#Tree). | +| amount | Number | Amount value to add to current outgoing balance. | - + -## App ⇐ [Service](#Service) -Web-friendly application framework for building single-page applications with -Fabric-based networking and storage. +### channel.fund(input) +Fund the channel. -**Kind**: global class -**Extends**: [Service](#Service) -**Properties** +**Kind**: instance method of [Channel](#Channel) -| Name | Type | Description | +| Param | Type | Description | | --- | --- | --- | -| components | [Collection](#Collection) | Interface elements. | -| stash | [Store](#Store) | Routable [Datastore](Datastore). | - - -* [App](#App) ⇐ [Service](#Service) - * [new App(definition)](#new_App_new) - * [.start()](#App+start) ⇒ Promise - * [.stop()](#App+stop) ⇒ Promise - * [.define(name, structure)](#App+define) ⇒ Object - * [.defer(authority)](#App+defer) ⇒ [App](#App) - * [.attach(element)](#App+attach) ⇒ [App](#App) - * [.consume(resources)](#App+consume) ⇒ [App](#App) - * [.envelop(selector)](#App+envelop) ⇒ [App](#App) - * [.use(name, definition)](#App+use) ⇒ [App](#App) - * [.render()](#App+render) ⇒ String - * [._registerService(name, Service)](#App+_registerService) ⇒ [Service](#Service) - * [.init()](#Service+init) - * [.tick()](#Service+tick) ⇒ Number - * [.beat()](#Service+beat) ⇒ [Service](#Service) - * [.get(path)](#Service+get) ⇒ Mixed - * [.set(path)](#Service+set) ⇒ Mixed - * [.trust(source)](#Service+trust) ⇒ [Service](#Service) - * [.handler(message)](#Service+handler) ⇒ [Service](#Service) - * [.lock([duration])](#Service+lock) ⇒ Boolean - * [.route(msg)](#Service+route) ⇒ Promise - * [._GET(path)](#Service+_GET) ⇒ Promise - * [._PUT(path, value, [commit])](#Service+_PUT) ⇒ Promise - * [.connect(notify)](#Service+connect) ⇒ Promise - * [.send(channel, message)](#Service+send) ⇒ [Service](#Service) - * [._registerActor(actor)](#Service+_registerActor) ⇒ Promise - * [._send(message)](#Service+_send) +| input | Mixed | Instance of a [Transaction](Transaction). | - + -### new App(definition) -Generic bundle for building Fabric applications. +### channel.open(channel) +Opens a [Channel](#Channel) with a [Peer](#Peer). -**Returns**: [App](#App) - Returns an instance of `App`. +**Kind**: instance method of [Channel](#Channel) | Param | Type | Description | | --- | --- | --- | -| definition | Object | Application definition. See `config` for examples. | - - - -### app.start() ⇒ Promise -Start the program. +| channel | Object | Channel settings. | -**Kind**: instance method of [App](#App) -**Overrides**: [start](#Service+start) - + -### app.stop() ⇒ Promise -Stop the program. +## Circuit +The [Circuit](#Circuit) is the mechanism through which [Fabric](#Fabric) +operates, a computable directed graph describing a network of +[Peer](#Peer) components and their interactions (side effects). +See also [Swarm](#Swarm) for deeper inspection of [Machine](#Machine) +mechanics. -**Kind**: instance method of [App](#App) - +**Kind**: global class + -### app.define(name, structure) ⇒ Object -Define a Resource, or "Type", used by the application. +## CLI +Provides a Command Line Interface (CLI) for interacting with +the Fabric network using a terminal emulator. -**Kind**: instance method of [App](#App) -**Returns**: Object - [description] +**Kind**: global class -| Param | Type | Description | -| --- | --- | --- | -| name | String | Human-friendly name for the Resource. | -| structure | Object | Map of attribute names -> definitions. | +* [CLI](#CLI) + * [new CLI([settings])](#new_CLI_new) + * [.start()](#CLI+start) + * [.stop()](#CLI+stop) + * [._handleGrantCommand(params)](#CLI+_handleGrantCommand) - + -### app.defer(authority) ⇒ [App](#App) -Defer control of this application to an outside authority. +### new CLI([settings]) +Create a terminal-based interface for a [User](User). -**Kind**: instance method of [App](#App) -**Returns**: [App](#App) - The configured application as deferred to `authority`. | Param | Type | Description | | --- | --- | --- | -| authority | String | Hostname to trust. | +| [settings] | Object | Configuration values. | +| [settings.currencies] | Array | List of currencies to support. | - + -### app.attach(element) ⇒ [App](#App) -Configure the Application to use a specific element. +### clI.start() +Starts (and renders) the CLI. -**Kind**: instance method of [App](#App) -**Returns**: [App](#App) - Configured instance of the Application. +**Kind**: instance method of [CLI](#CLI) + -| Param | Type | Description | -| --- | --- | --- | -| element | DOMElement | DOM element to bind to. | +### clI.stop() +Disconnect all interfaces and exit the process. - +**Kind**: instance method of [CLI](#CLI) + -### app.consume(resources) ⇒ [App](#App) -Define the Application's resources from an existing resource map. +### clI.\_handleGrantCommand(params) +Creates a token for the target signer with a provided role and some optional data. -**Kind**: instance method of [App](#App) -**Returns**: [App](#App) - Configured instance of the Application. +**Kind**: instance method of [CLI](#CLI) | Param | Type | Description | | --- | --- | --- | -| resources | Object | Map of resource definitions by name. | +| params | Array | Parameters array. | - + -### app.envelop(selector) ⇒ [App](#App) -Use a CSS selector to find an element in the current document's tree and -bind to it as the render target. +## Collection +The [Collection](#Collection) type maintains an ordered list of [State](#State) items. -**Kind**: instance method of [App](#App) -**Returns**: [App](#App) - Instance of app with bound element. +**Kind**: global class +**Properties** -| Param | Type | Description | +| Name | Type | Description | | --- | --- | --- | -| selector | String | CSS selector. | +| @entity | Object | Fabric-bound entity object. | + + +* [Collection](#Collection) + * [new Collection([configuration])](#new_Collection_new) + * [.asMerkleTree()](#Collection+asMerkleTree) ⇒ MerkleTree + * [._setKey(name)](#Collection+_setKey) + * [.getByID(id)](#Collection+getByID) + * [.getLatest()](#Collection+getLatest) + * [.findByField(name, value)](#Collection+findByField) + * [.findByName(name)](#Collection+findByName) + * [.findBySymbol(symbol)](#Collection+findBySymbol) + * [._patchTarget(path, patches)](#Collection+_patchTarget) + * [.push(data)](#Collection+push) ⇒ Number + * [.get(path)](#Collection+get) ⇒ Mixed + * [.set(path)](#Collection+set) ⇒ Mixed + * ~~[.list()](#Collection+list) ⇒ Array~~ + * [.toTypedArray()](#Collection+toTypedArray) + * [.map()](#Collection+map) ⇒ Array + * [.create(entity)](#Collection+create) ⇒ Promise + * [.import(state, commit)](#Collection+import) - + -### app.use(name, definition) ⇒ [App](#App) -Define a named [Resource](#Resource). +### new Collection([configuration]) +Create a list of [Entity](Entity)-like objects for later retrieval. -**Kind**: instance method of [App](#App) -**Returns**: [App](#App) - Configurated instance of the [App](#App). +**Returns**: [Collection](#Collection) - Configured instance of the the [Collection](#Collection). -| Param | Type | Description | -| --- | --- | --- | -| name | String | Human-friendly name for this resource. | -| definition | Object | Map of configuration values. | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [configuration] | Object | {} | Configuration object. | - + -### app.render() ⇒ String -Get the output of our program. +### collection.asMerkleTree() ⇒ MerkleTree +Current elements of the collection as a [MerkleTree](MerkleTree). -**Kind**: instance method of [App](#App) -**Returns**: String - Output of the program. - +**Kind**: instance method of [Collection](#Collection) + -### app.\_registerService(name, Service) ⇒ [Service](#Service) -Registers a named [Service](#Service) with the application. Services are -standardized interfaces for Fabric contracts, emitting [Message](#Message) -events with a predictable lifecycle. +### collection.\_setKey(name) +Sets the `key` property of collection settings. -**Kind**: instance method of [App](#App) -**Returns**: [Service](#Service) - The registered service instance. -**Internal**: +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| name | String | Internal name of the service. | -| Service | Class | The ES6 class definition implementing [Service](#Service). | +| name | String | Value to set the `key` setting to. | - + -### app.init() -Called by Web Components. -TODO: move to @fabric/http/types/spa +### collection.getByID(id) +Retrieve an element from the collection by ID. -**Kind**: instance method of [App](#App) -**Overrides**: [init](#Service+init) - +**Kind**: instance method of [Collection](#Collection) -### app.tick() ⇒ Number -Move forward one clock cycle. +| Param | Type | Description | +| --- | --- | --- | +| id | String | Document identifier. | -**Kind**: instance method of [App](#App) -**Overrides**: [tick](#Service+tick) - + -### app.beat() ⇒ [Service](#Service) -Compute latest state. +### collection.getLatest() +Retrieve the most recent element in the collection. -**Kind**: instance method of [App](#App) -**Overrides**: [beat](#Service+beat) -**Emits**: Message#event:beat - +**Kind**: instance method of [Collection](#Collection) + -### app.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). +### collection.findByField(name, value) +Find a document by specific field. -**Kind**: instance method of [App](#App) -**Overrides**: [get](#Service+get) -**Returns**: Mixed - Returns the target value if found, otherwise null. +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| name | String | Name of field to search. | +| value | String | Value to match. | - + -### app.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. +### collection.findByName(name) +Find a document by the "name" field. -**Kind**: instance method of [App](#App) -**Overrides**: [set](#Service+set) +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| name | String | Name to search for. | - + -### app.trust(source) ⇒ [Service](#Service) -Explicitly trust all events from a known source. +### collection.findBySymbol(symbol) +Find a document by the "symbol" field. -**Kind**: instance method of [App](#App) -**Overrides**: [trust](#Service+trust) -**Returns**: [Service](#Service) - Instance of Service after binding events. +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| source | EventEmitter | Emitter of events. | +| symbol | String | Value to search for. | - + -### app.handler(message) ⇒ [Service](#Service) -Default route handler for an incoming message. Follows the Activity -Streams 2.0 spec: https://www.w3.org/TR/activitystreams-core/ +### collection.\_patchTarget(path, patches) +Modify a target document using an array of atomic updates. -**Kind**: instance method of [App](#App) -**Overrides**: [handler](#Service+handler) -**Returns**: [Service](#Service) - Chainable method. +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| message | Activity | Message object. | +| path | String | Path to the document to modify. | +| patches | Array | List of operations to apply. | - + -### app.lock([duration]) ⇒ Boolean -Attempt to acquire a lock for `duration` seconds. +### collection.push(data) ⇒ Number +Adds an [Entity](Entity) to the [Collection](#Collection). -**Kind**: instance method of [App](#App) -**Overrides**: [lock](#Service+lock) -**Returns**: Boolean - true if locked, false if unable to lock. +**Kind**: instance method of [Collection](#Collection) +**Returns**: Number - Length of the collection. -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [duration] | Number | 1000 | Number of milliseconds to hold lock. | +| Param | Type | Description | +| --- | --- | --- | +| data | Mixed | [Entity](Entity) to add. | - + -### app.route(msg) ⇒ Promise -Resolve a [State](#State) from a particular [Message](#Message) object. +### collection.get(path) ⇒ Mixed +Retrieve a key from the [State](#State). -**Kind**: instance method of [App](#App) -**Overrides**: [route](#Service+route) -**Returns**: Promise - Resolves with resulting [State](#State). +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| msg | [Message](#Message) | Explicit Fabric [Message](#Message). | +| path | Path | Key to retrieve. | - + -### app.\_GET(path) ⇒ Promise -Retrieve a value from the Service's state. +### collection.set(path) ⇒ Mixed +Set a key in the [State](#State) to a particular value. -**Kind**: instance method of [App](#App) -**Overrides**: [\_GET](#Service+_GET) -**Returns**: Promise - Resolves with the result. +**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| path | String | Path of the value to retrieve. | - - +| path | Path | Key to retrieve. | -### app.\_PUT(path, value, [commit]) ⇒ Promise -Store a value in the Service's state. + -**Kind**: instance method of [App](#App) -**Overrides**: [\_PUT](#Service+_PUT) -**Returns**: Promise - Resolves with with stored document. +### ~~collection.list() ⇒ Array~~ +***Deprecated*** -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| path | String | | Path to store the value at. | -| value | Object | | Document to store. | -| [commit] | Boolean | false | Sign the resulting state. | +Generate a list of elements in the collection. - +**Kind**: instance method of [Collection](#Collection) + -### app.connect(notify) ⇒ Promise -Attach to network. +### collection.toTypedArray() +Provides the [Collection](#Collection) as an [Array](Array) of typed +elements. The type of these elments are defined by the collection's +type, supplied in the constructor. -**Kind**: instance method of [App](#App) -**Overrides**: [connect](#Service+connect) -**Returns**: Promise - Resolves to [Fabric](#Fabric). +**Kind**: instance method of [Collection](#Collection) + -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| notify | Boolean | true | Commit to changes. | +### collection.map() ⇒ Array +Generate a hashtable of elements in the collection. - +**Kind**: instance method of [Collection](#Collection) + -### app.send(channel, message) ⇒ [Service](#Service) -Send a message to a channel. +### collection.create(entity) ⇒ Promise +Create an instance of an [Entity](Entity). -**Kind**: instance method of [App](#App) -**Overrides**: [send](#Service+send) -**Returns**: [Service](#Service) - Chainable method. +**Kind**: instance method of [Collection](#Collection) +**Returns**: Promise - Resolves with instantiated [Entity](Entity). | Param | Type | Description | | --- | --- | --- | -| channel | String | Channel name to which the message will be sent. | -| message | String | Content of the message to send. | +| entity | Object | Object with properties. | - + -### app.\_registerActor(actor) ⇒ Promise -Register an [Actor](#Actor) with the [Service](#Service). +### collection.import(state, commit) +Loads [State](#State) into memory. -**Kind**: instance method of [App](#App) -**Overrides**: [\_registerActor](#Service+_registerActor) -**Returns**: Promise - Resolves upon successful registration. +**Kind**: instance method of [Collection](#Collection) +**Emits**: event:message Will emit one {@link Snapshot} message. | Param | Type | Description | | --- | --- | --- | -| actor | Object | Instance of the [Actor](#Actor). | +| state | [State](#State) | State to import. | +| commit | Boolean | Whether or not to commit the result. | - + -### app.\_send(message) -Sends a message. +## Environment +Interact with the user's Environment. -**Kind**: instance method of [App](#App) -**Overrides**: [\_send](#Service+_send) +**Kind**: global class -| Param | Type | Description | -| --- | --- | --- | -| message | Mixed | Message to send. | +* [Environment](#Environment) + * [new Environment([settings])](#new_Environment_new) + * [.readVariable(name)](#Environment+readVariable) ⇒ String + * [.setWallet(wallet, force)](#Environment+setWallet) ⇒ [Environment](#Environment) + * [.start()](#Environment+start) ⇒ [Environment](#Environment) - + -## Chain -Chain. +### new Environment([settings]) +Create an instance of [Environment](#Environment). -**Kind**: global class -**Properties** +**Returns**: [Environment](#Environment) - Instance of the Environment. -| Name | Type | Description | +| Param | Type | Description | | --- | --- | --- | -| name | String | Current name. | -| indices | Map | | -| storage | Storage | | +| [settings] | Object | Settings for the Fabric environment. | - + -### new Chain(genesis) -Holds an immutable chain of events. +### environment.readVariable(name) ⇒ String +Read a variable from the environment. +**Kind**: instance method of [Environment](#Environment) +**Returns**: String - Value of the variable (or an empty string). | Param | Type | Description | | --- | --- | --- | -| genesis | [Vector](#Vector) | Initial state for the chain of events. | +| name | String | Variable name to read. | - + -## Channel -The [Channel](#Channel) is a encrypted connection with a member of your -[Peer](#Peer) group, with some amount of $BTC bonded and paid for each -correctly-validated message. +### environment.setWallet(wallet, force) ⇒ [Environment](#Environment) +Configure the Environment to use a Fabric [Wallet](#Wallet). -Channels in Fabric are powerful tools for application development, as they -can empower users with income opportunities in exchange for delivering -service to the network. +**Kind**: instance method of [Environment](#Environment) +**Returns**: [Environment](#Environment) - The Fabric Environment. + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| wallet | [Wallet](#Wallet) | | Wallet to attach. | +| force | Boolean | false | Force existing wallets to be destroyed. | + + + +### environment.start() ⇒ [Environment](#Environment) +Start the Environment. + +**Kind**: instance method of [Environment](#Environment) +**Returns**: [Environment](#Environment) - The Fabric Environment. + + +## Fabric +Reliable decentralized infrastructure. **Kind**: global class +**Emits**: Fabric#event:thread, Fabric#event:step Emitted on a `compute` step. -* [Channel](#Channel) - * [new Channel([settings])](#new_Channel_new) - * [.add(amount)](#Channel+add) - * [.fund(input)](#Channel+fund) - * [.open(channel)](#Channel+open) +* [Fabric](#Fabric) + * [new Fabric(config)](#new_Fabric_new) + * [.register(service)](#Fabric+register) + * [.push(value)](#Fabric+push) ⇒ [Stack](#Stack) + * [.trust(source)](#Fabric+trust) ⇒ [Fabric](#Fabric) + * [.compute()](#Fabric+compute) ⇒ [Fabric](#Fabric) - + -### new Channel([settings]) -Creates a channel between two peers. -of many transactions over time, to be settled on-chain later. +### new Fabric(config) +The [Fabric](#Fabric) type implements a peer-to-peer protocol for +establishing and settling of mutually-agreed upon proofs of +work. Contract execution takes place in the local node first, +then is optionally shared with the network. + +Utilizing | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Configuration for the channel. | +| config | [Vector](#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. | - + -### channel.add(amount) -Add an amount to the channel's balance. +### fabric.register(service) +Register an available [Service](#Service) using an ES6 [Class](Class). -**Kind**: instance method of [Channel](#Channel) +**Kind**: instance method of [Fabric](#Fabric) | Param | Type | Description | | --- | --- | --- | -| amount | Number | Amount value to add to current outgoing balance. | +| service | Class | The ES6 [Class](Class). | - + -### channel.fund(input) -Fund the channel. +### fabric.push(value) ⇒ [Stack](#Stack) +Push an instruction onto the stack. -**Kind**: instance method of [Channel](#Channel) +**Kind**: instance method of [Fabric](#Fabric) -| Param | Type | Description | -| --- | --- | --- | -| input | Mixed | Instance of a [Transaction](Transaction). | +| Param | Type | +| --- | --- | +| value | Instruction | - + -### channel.open(channel) -Opens a [Channel](#Channel) with a [Peer](#Peer). +### fabric.trust(source) ⇒ [Fabric](#Fabric) +Blindly consume messages from a [Source](Source), relying on `this.chain` to +verify results. -**Kind**: instance method of [Channel](#Channel) +**Kind**: instance method of [Fabric](#Fabric) +**Returns**: [Fabric](#Fabric) - Returns itself. | Param | Type | Description | | --- | --- | --- | -| channel | Object | Channel settings. | +| source | EventEmitter | Any object which implements the `EventEmitter` pattern. | - + -## Circuit -The [Circuit](#Circuit) is the mechanism through which [Fabric](#Fabric) -operates, a computable directed graph describing a network of -[Peer](#Peer) components and their interactions (side effects). -See also [Swarm](#Swarm) for deeper *inspection of [Machine](#Machine) -mechanics. +### fabric.compute() ⇒ [Fabric](#Fabric) +Process the current stack. -**Kind**: global class - +**Kind**: instance method of [Fabric](#Fabric) +**Returns**: [Fabric](#Fabric) - Resulting instance of the stack. + -## CLI -Provides a Command Line Interface (CLI) for interacting with -the Fabric network using a terminal emulator. +## Federation +Create and manage sets of signers with the Federation class. **Kind**: global class -* [CLI](#CLI) - * [new CLI([settings])](#new_CLI_new) - * [.start()](#CLI+start) - * [.stop()](#CLI+stop) - * [._handleGrantCommand(params)](#CLI+_handleGrantCommand) +* [Federation](#Federation) + * [new Federation([settings])](#new_Federation_new) + * [.start()](#Federation+start) ⇒ [Federation](#Federation) - + -### new CLI([settings]) -Create a terminal-based interface for a [User](User). +### new Federation([settings]) +Create an instance of a federation. +**Returns**: [Federation](#Federation) - Instance of the federation. | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Configuration values. | -| [settings.currencies] | Array | List of currencies to support. | +| [settings] | Object | Settings. | - + -### clI.start() -Starts (and renders) the CLI. +### federation.start() ⇒ [Federation](#Federation) +Start tracking state (i.e., ready to receive events). -**Kind**: instance method of [CLI](#CLI) - +**Kind**: instance method of [Federation](#Federation) +**Returns**: [Federation](#Federation) - Instance of the Federation. + -### clI.stop() -Disconnect all interfaces and exit the process. +## Filesystem +Interact with a local filesystem. -**Kind**: instance method of [CLI](#CLI) - +**Kind**: global class -### clI.\_handleGrantCommand(params) -Creates a token for the target signer with a provided role and some optional data. - -**Kind**: instance method of [CLI](#CLI) - -| Param | Type | Description | -| --- | --- | --- | -| params | Array | Parameters array. | +* [Filesystem](#Filesystem) + * [new Filesystem([settings])](#new_Filesystem_new) + * [.ls()](#Filesystem+ls) ⇒ Array + * [.readFile(name)](#Filesystem+readFile) ⇒ Buffer + * [.writeFile(name, content)](#Filesystem+writeFile) ⇒ Boolean + * [._loadFromDisk()](#Filesystem+_loadFromDisk) ⇒ Promise + * [.sync()](#Filesystem+sync) ⇒ [Filesystem](#Filesystem) - + -## Collection -The [Collection](#Collection) type maintains an ordered list of [State](#State) items. +### new Filesystem([settings]) +Synchronize an [Actor](#Actor) with a local filesystem. -**Kind**: global class -**Properties** +**Returns**: [Filesystem](#Filesystem) - Instance of the Fabric filesystem. -| Name | Type | Description | +| Param | Type | Description | | --- | --- | --- | -| @entity | Object | Fabric-bound entity object. | - - -* [Collection](#Collection) - * [new Collection([configuration])](#new_Collection_new) - * [.asMerkleTree()](#Collection+asMerkleTree) ⇒ MerkleTree - * [._setKey(name)](#Collection+_setKey) - * [.getByID(id)](#Collection+getByID) - * [.getLatest()](#Collection+getLatest) - * [.findByField(name, value)](#Collection+findByField) - * [.findByName(name)](#Collection+findByName) - * [.findBySymbol(symbol)](#Collection+findBySymbol) - * [._patchTarget(path, patches)](#Collection+_patchTarget) - * [.push(data)](#Collection+push) ⇒ Number - * [.get(path)](#Collection+get) ⇒ Mixed - * [.set(path)](#Collection+set) ⇒ Mixed - * ~~[.list()](#Collection+list) ⇒ Array~~ - * [.toTypedArray()](#Collection+toTypedArray) - * [.map()](#Collection+map) ⇒ Array - * [.create(entity)](#Collection+create) ⇒ Promise - * [.import(state, commit)](#Collection+import) - - - -### new Collection([configuration]) -Create a list of [Entity](#Entity)-like objects for later retrieval. - -**Returns**: [Collection](#Collection) - Configured instance of the the [Collection](#Collection). - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [configuration] | Object | {} | Configuration object. | +| [settings] | Object | Configuration for the Fabric filesystem. | +| [settings.path] | Object | Path of the local filesystem. | - + -### collection.asMerkleTree() ⇒ MerkleTree -Current elements of the collection as a [MerkleTree](MerkleTree). +### filesystem.ls() ⇒ Array +Get the list of files. -**Kind**: instance method of [Collection](#Collection) - +**Kind**: instance method of [Filesystem](#Filesystem) +**Returns**: Array - List of files. + -### collection.\_setKey(name) -Sets the `key` property of collection settings. +### filesystem.readFile(name) ⇒ Buffer +Read a file by name. -**Kind**: instance method of [Collection](#Collection) +**Kind**: instance method of [Filesystem](#Filesystem) +**Returns**: Buffer - Contents of the file. | Param | Type | Description | | --- | --- | --- | -| name | String | Value to set the `key` setting to. | +| name | String | Name of the file to read. | - + -### collection.getByID(id) -Retrieve an element from the collection by ID. +### filesystem.writeFile(name, content) ⇒ Boolean +Write a file by name. -**Kind**: instance method of [Collection](#Collection) +**Kind**: instance method of [Filesystem](#Filesystem) +**Returns**: Boolean - `true` if the write succeeded, `false` if it did not. | Param | Type | Description | | --- | --- | --- | -| id | String | Document identifier. | - - +| name | String | Name of the file to write. | +| content | Buffer | Content of the file. | -### collection.getLatest() -Retrieve the most recent element in the collection. + -**Kind**: instance method of [Collection](#Collection) - +### filesystem.\_loadFromDisk() ⇒ Promise +Load Filesystem state from disk. -### collection.findByField(name, value) -Find a document by specific field. +**Kind**: instance method of [Filesystem](#Filesystem) +**Returns**: Promise - Resolves with Filesystem instance. + -**Kind**: instance method of [Collection](#Collection) +### filesystem.sync() ⇒ [Filesystem](#Filesystem) +Syncronize state from the local filesystem. -| Param | Type | Description | -| --- | --- | --- | -| name | String | Name of field to search. | -| value | String | Value to match. | +**Kind**: instance method of [Filesystem](#Filesystem) +**Returns**: [Filesystem](#Filesystem) - Instance of the Fabric filesystem. + - +## Hash256 +Simple interaction with 256-bit spaces. -### collection.findByName(name) -Find a document by the "name" field. +**Kind**: global class -**Kind**: instance method of [Collection](#Collection) +* [Hash256](#Hash256) + * [new Hash256(settings)](#new_Hash256_new) + * [.digest(input)](#Hash256.digest) ⇒ String + * [.reverse()](#Hash256.reverse) -| Param | Type | Description | -| --- | --- | --- | -| name | String | Name to search for. | + - +### new Hash256(settings) +Create an instance of a `Hash256` object by calling `new Hash256()`, +where `settings` can be provided to supply a particular input object. -### collection.findBySymbol(symbol) -Find a document by the "symbol" field. +If the `settings` is not a string, `input` must be provided. -**Kind**: instance method of [Collection](#Collection) | Param | Type | Description | | --- | --- | --- | -| symbol | String | Value to search for. | +| settings | Object | | +| settings.input | String | Input string to map as 256-bit hash. | - + -### collection.\_patchTarget(path, patches) -Modify a target document using an array of atomic updates. +### Hash256.digest(input) ⇒ String +Produce a SHA256 digest of some input data. -**Kind**: instance method of [Collection](#Collection) +**Kind**: static method of [Hash256](#Hash256) +**Returns**: String - `SHA256(input)` as a hexadecimal string. | Param | Type | Description | | --- | --- | --- | -| path | String | Path to the document to modify. | -| patches | Array | List of operations to apply. | - - +| input | String \| Buffer | Content to digest. | -### collection.push(data) ⇒ Number -Adds an [Entity](#Entity) to the [Collection](#Collection). + -**Kind**: instance method of [Collection](#Collection) -**Returns**: Number - Length of the collection. +### Hash256.reverse() +Reverses the bytes of the digest. -| Param | Type | Description | -| --- | --- | --- | -| data | Mixed | [Entity](#Entity) to add. | +**Kind**: static method of [Hash256](#Hash256) + - +## HKDF +Provides an HMAC-based Extract-and-Expand Key Derivation Function (HKDF), compatible with +RFC 5869. Defaults to 32 byte output, matching Bitcoin's implementaton. -### collection.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). +**Kind**: global class -**Kind**: instance method of [Collection](#Collection) +* [HKDF](#HKDF) + * [new HKDF(settings)](#new_HKDF_new) + * [.derive([info], [size])](#HKDF+derive) -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | + - +### new HKDF(settings) +Create an HKDF instance. -### collection.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. -**Kind**: instance method of [Collection](#Collection) +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| settings | Object | | List of settings. | +| settings.initial | String | | Input keying material. | +| [settings.algorithm] | String | sha256 | Name of the hashing algorithm to use. | +| [settings.salt] | String | | Salt value (a non-secret random value). | -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | + - +### hkdF.derive([info], [size]) +Derive a new output. -### ~~collection.list() ⇒ Array~~ -***Deprecated*** +**Kind**: instance method of [HKDF](#HKDF) -Generate a list of elements in the collection. +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [info] | Buffer | | Context and application specific information. | +| [size] | Number | 32 | Length of output. | -**Kind**: instance method of [Collection](#Collection) - + -### collection.toTypedArray() -Provides the [Collection](#Collection) as an [Array](Array) of typed -elements. The type of these elments are defined by the collection's -type, supplied in the constructor. +## Identity +Manage a network identity. -**Kind**: instance method of [Collection](#Collection) - +**Kind**: global class -### collection.map() ⇒ Array -Generate a hashtable of elements in the collection. +* [Identity](#Identity) + * [new Identity([settings])](#new_Identity_new) + * [.sign(data)](#Identity+sign) ⇒ Signature + * [.toString()](#Identity+toString) ⇒ String -**Kind**: instance method of [Collection](#Collection) - + -### collection.create(entity) ⇒ Promise -Create an instance of an [Entity](#Entity). +### new Identity([settings]) +Create an instance of an Identity. -**Kind**: instance method of [Collection](#Collection) -**Returns**: Promise - Resolves with instantiated [Entity](#Entity). +**Returns**: [Identity](#Identity) - Instance of the identity. -| Param | Type | Description | -| --- | --- | --- | -| entity | Object | Object with properties. | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [settings] | Object | | Settings for the Identity. | +| [settings.seed] | String | | BIP 39 seed phrase. | +| [settings.xprv] | String | | Serialized BIP 32 master private key. | +| [settings.xpub] | String | | Serialized BIP 32 master public key. | +| [settings.account] | Number | 0 | BIP 44 account index. | +| [settings.index] | Number | 0 | BIP 44 key index. | - + -### collection.import(state, commit) -Loads [State](#State) into memory. +### identity.sign(data) ⇒ Signature +Sign a buffer of data using BIP 340: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki -**Kind**: instance method of [Collection](#Collection) -**Emits**: event:message Will emit one {@link Snapshot} message. +**Kind**: instance method of [Identity](#Identity) +**Returns**: Signature - Resulting signature (64 bytes). | Param | Type | Description | | --- | --- | --- | -| state | [State](#State) | State to import. | -| commit | Boolean | Whether or not to commit the result. | +| data | Buffer | Buffer of data to sign. | - + -## Compiler : [Actor](#Actor) -Compilers build interfaces for users of Fabric applications. +### identity.toString() ⇒ String +Retrieve the bech32m-encoded identity. + +**Kind**: instance method of [Identity](#Identity) +**Returns**: String - Public identity. + + +## Interface ⇐ EventEmitter +Interfaces compile abstract contract code into [Chain](#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 | | --- | --- | --- | -| ast | AST | Compiler's current AST. | -| entity | [Entity](#Entity) | Compiler's current [Entity](#Entity). | +| status | String | Human-friendly value representing the Interface's current [State](#State). | -* [Compiler](#Compiler) : [Actor](#Actor) - * [new Compiler(settings)](#new_Compiler_new) - * _instance_ - * [._getJavaScriptAST(input)](#Compiler+_getJavaScriptAST) ⇒ AST - * _static_ - * [._fromJavaScript(body)](#Compiler._fromJavaScript) ⇒ +* [Interface](#Interface) ⇐ EventEmitter + * [new Interface(settings)](#new_Interface_new) + * [.log(...inputs)](#Interface+log) + * [.now()](#Interface+now) ⇒ Number + * [.start()](#Interface+start) + * [.stop()](#Interface+stop) + * [.cycle(val)](#Interface+cycle) - + -### new Compiler(settings) -Create a new Compiler. +### new Interface(settings) +Define an [Interface](#Interface) by creating an instance of this class. -**Returns**: [Compiler](#Compiler) - Instance of the compiler. +**Returns**: [Interface](#Interface) - Instance of the [Interface](#Interface). -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| settings | Object | {} | Configuration. | -| settings.body | Buffer | | Body of the input program to compile. | +| Param | Type | Description | +| --- | --- | --- | +| settings | Object | Configuration values. | - + -### compiler.\_getJavaScriptAST(input) ⇒ AST -Parse a [Buffer](Buffer) of JavaScript into an Abstract Syntax Tree ([AST](AST)). +### interface.log(...inputs) +Log some output to the console. -**Kind**: instance method of [Compiler](#Compiler) +**Kind**: instance method of [Interface](#Interface) | Param | Type | Description | | --- | --- | --- | -| input | Buffer | Input JavaScript to parse. | +| ...inputs | any | Components of the message to long. Can be a single {@link} String, many [String](String) objects, or anything else. | - + -### Compiler.\_fromJavaScript(body) ⇒ -Creates a new Compiler instance from a JavaScript contract. +### interface.now() ⇒ Number +Returns current timestamp. -**Kind**: static method of [Compiler](#Compiler) -**Returns**: Compiler +**Kind**: instance method of [Interface](#Interface) + -| Param | Type | Description | -| --- | --- | --- | -| body | Buffer | Content of the JavaScript to evaluate. | +### interface.start() +Start the [Interface](#Interface). - +**Kind**: instance method of [Interface](#Interface) + -## Consensus -Provides various network-specific rules. +### interface.stop() +Stop the Interface. -**Kind**: global class - +**Kind**: instance method of [Interface](#Interface) + -### new Consensus([settings]) -Create an instance of a [Consensus](#Consensus) verifier. +### interface.cycle(val) +Ticks the clock with a named [Cycle](Cycle). +**Kind**: instance method of [Interface](#Interface) | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Configuration for the network. | -| [settings.network] | String | Name of the network. | -| [settings.provider] | String | Name of the source provider. | +| val | String | Name of cycle to scribe. | - + -## Entity : Object -Live instance of an ARC in Fabric. +## Key +Represents a cryptographic key. **Kind**: global class + -* [Entity](#Entity) : Object - * [new Entity([data])](#new_Entity_new) - * [.toJSON()](#Entity+toJSON) ⇒ String - * [.toRaw()](#Entity+toRaw) ⇒ Buffer - * [._downsample([input])](#Entity+_downsample) - - - -### new Entity([data]) -Generic template for virtual objects. +### new Key([settings]) +Create an instance of a Fabric Key, either restoring from some known +values or from prior knowledge. For instance, you can call `new Key()` +to create a fresh keypair, or `new Key({ public: 'deadbeef...' })` to +create it from a known public key. -**Returns**: [Entity](#Entity) - Instance of the [Entity](#Entity). | Param | Type | Default | Description | | --- | --- | --- | --- | -| [data] | Object | {} | Pass an object to use. | +| [settings] | Object | | Initialization for the key. | +| [settings.network] | String | | Network string. | +| [settings.seed] | String | | Mnemonic seed for initializing the key. | +| [settings.public] | String | | Public key in hex. | +| [settings.private] | String | | Private key in hex. | +| [settings.purpose] | String | 44 | Constrains derivations to this space. | - + -### entity.toJSON() ⇒ String -Produces a string of JSON, representing the entity. +## Ledger ⇐ [Scribe](#Scribe) +An ordered stack of pages. -**Kind**: instance method of [Entity](#Entity) -**Returns**: String - JSON-encoded object. - +**Kind**: global class +**Extends**: [Scribe](#Scribe) +**Properties** -### entity.toRaw() ⇒ Buffer -As a [Buffer](Buffer). +| Name | Type | Description | +| --- | --- | --- | +| memory | Buffer | The ledger's memory (4096 bytes). | +| stack | [Stack](#Stack) | The ledger's stack. | +| tip | Mixed | The most recent page in the ledger. | -**Kind**: instance method of [Entity](#Entity) -**Returns**: Buffer - Slice of memory. - -### entity.\_downsample([input]) -Return a [Fabric](#Fabric)-labeled [Object](Object) for this [Entity](#Entity). +* [Ledger](#Ledger) ⇐ [Scribe](#Scribe) + * [.append(item)](#Ledger+append) ⇒ Promise + * [.now()](#Scribe+now) ⇒ Number + * [.trust(source)](#Scribe+trust) ⇒ [Scribe](#Scribe) + * [.inherits(scribe)](#Scribe+inherits) ⇒ [Scribe](#Scribe) -**Kind**: instance method of [Entity](#Entity) + -| Param | Type | Description | -| --- | --- | --- | -| [input] | Mixed | Input to downsample. If not provided, current Entity will be used. | +### ledger.append(item) ⇒ Promise +Attempts to append a [Page](Page) to the ledger. - +**Kind**: instance method of [Ledger](#Ledger) +**Returns**: Promise - Resolves after the change has been committed. -## Environment -Interact with the user's Environment. +| Param | Type | Description | +| --- | --- | --- | +| item | Mixed | Item to store. | -**Kind**: global class + -* [Environment](#Environment) - * [new Environment([settings])](#new_Environment_new) - * [.readVariable(name)](#Environment+readVariable) ⇒ String - * [.setWallet(wallet, force)](#Environment+setWallet) ⇒ [Environment](#Environment) - * [.start()](#Environment+start) ⇒ [Environment](#Environment) +### ledger.now() ⇒ Number +Retrives the current timestamp, in milliseconds. - +**Kind**: instance method of [Ledger](#Ledger) +**Overrides**: [now](#Scribe+now) +**Returns**: Number - [Number](Number) representation of the millisecond [Integer](Integer) value. + -### new Environment([settings]) -Create an instance of [Environment](#Environment). +### ledger.trust(source) ⇒ [Scribe](#Scribe) +Blindly bind event handlers to the [Source](Source). -**Returns**: [Environment](#Environment) - Instance of the Environment. +**Kind**: instance method of [Ledger](#Ledger) +**Overrides**: [trust](#Scribe+trust) +**Returns**: [Scribe](#Scribe) - Instance of the [Scribe](#Scribe). | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Settings for the Fabric environment. | +| source | Source | Event stream. | - + -### environment.readVariable(name) ⇒ String -Read a variable from the environment. +### ledger.inherits(scribe) ⇒ [Scribe](#Scribe) +Use an existing Scribe instance as a parent. -**Kind**: instance method of [Environment](#Environment) -**Returns**: String - Value of the variable (or an empty string). +**Kind**: instance method of [Ledger](#Ledger) +**Overrides**: [inherits](#Scribe+inherits) +**Returns**: [Scribe](#Scribe) - The configured instance of the Scribe. | Param | Type | Description | | --- | --- | --- | -| name | String | Variable name to read. | - - - -### environment.setWallet(wallet, force) ⇒ [Environment](#Environment) -Configure the Environment to use a Fabric [Wallet](#Wallet). - -**Kind**: instance method of [Environment](#Environment) -**Returns**: [Environment](#Environment) - The Fabric Environment. - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| wallet | [Wallet](#Wallet) | | Wallet to attach. | -| force | Boolean | false | Force existing wallets to be destroyed. | - - - -### environment.start() ⇒ [Environment](#Environment) -Start the Environment. +| scribe | [Scribe](#Scribe) | Instance of Scribe to use as parent. | -**Kind**: instance method of [Environment](#Environment) -**Returns**: [Environment](#Environment) - The Fabric Environment. - + -## Fabric -Reliable decentralized infrastructure. +## Logger ⇐ [Actor](#Actor) +A basic logger that writes logs to the local file system **Kind**: global class -**Emits**: Fabric#event:thread, Fabric#event:step Emitted on a `compute` step. +**Extends**: [Actor](#Actor) -* [Fabric](#Fabric) - * [new Fabric(config)](#new_Fabric_new) - * [.register(service)](#Fabric+register) - * [.push(value)](#Fabric+push) ⇒ [Stack](#Stack) - * [.trust(source)](#Fabric+trust) ⇒ [Fabric](#Fabric) - * [.compute()](#Fabric+compute) ⇒ [Fabric](#Fabric) +* [Logger](#Logger) ⇐ [Actor](#Actor) + * [.path](#Logger+path) ⇒ String + * [.log(msg)](#Logger+log) ⇒ Boolean + * [.start()](#Logger+start) ⇒ Promise + * [.stop()](#Logger+stop) ⇒ Promise + * [.adopt(changes)](#Actor+adopt) ⇒ [Actor](#Actor) + * [.commit()](#Actor+commit) ⇒ String + * [.export()](#Actor+export) ⇒ Object + * [.get(path)](#Actor+get) ⇒ Object + * [.set(path, value)](#Actor+set) ⇒ Object + * [.toBuffer()](#Actor+toBuffer) ⇒ Buffer + * [.toGenericMessage()](#Actor+toGenericMessage) ⇒ Object + * [.toObject()](#Actor+toObject) ⇒ Object + * [.pause()](#Actor+pause) ⇒ [Actor](#Actor) + * [.serialize()](#Actor+serialize) ⇒ String + * [.sign()](#Actor+sign) ⇒ [Actor](#Actor) + * [.unpause()](#Actor+unpause) ⇒ [Actor](#Actor) + * [.value([format])](#Actor+value) ⇒ Object + * [._readObject(input)](#Actor+_readObject) ⇒ Object - + -### new Fabric(config) -The [Fabric](#Fabric) type implements a peer-to-peer protocol for -establishing and settling of mutually-agreed upon proofs of -work. Contract execution takes place in the local node first, -then is optionally shared with the network. +### logger.path ⇒ String +Returns the path to the log file -Utilizing +**Kind**: instance property of [Logger](#Logger) + + +### logger.log(msg) ⇒ Boolean +Writes the specified log to the log file +**Kind**: instance method of [Logger](#Logger) +**Returns**: Boolean - true, if msg was successfully written; false otherwise | Param | Type | Description | | --- | --- | --- | -| config | [Vector](#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. | - - - -### fabric.register(service) -Register an available [Service](#Service) using an ES6 [Class](Class). +| msg | String \| Object | The message to log | -**Kind**: instance method of [Fabric](#Fabric) + -| Param | Type | Description | -| --- | --- | --- | -| service | Class | The ES6 [Class](Class). | +### logger.start() ⇒ Promise +Starts the logger - +This method creates the required directories for writing the log file. -### fabric.push(value) ⇒ [Stack](#Stack) -Push an instruction onto the stack. +**Kind**: instance method of [Logger](#Logger) + -**Kind**: instance method of [Fabric](#Fabric) +### logger.stop() ⇒ Promise +Stops the logger -| Param | Type | -| --- | --- | -| value | Instruction | +This method closes the log file and returns after it has been closed. Any +errors on close would cause the return promise to be rejected. - +**Kind**: instance method of [Logger](#Logger) + -### fabric.trust(source) ⇒ [Fabric](#Fabric) -Blindly consume messages from a [Source](Source), relying on `this.chain` to -verify results. +### logger.adopt(changes) ⇒ [Actor](#Actor) +Explicitly adopt a set of [JSONPatch](JSONPatch)-encoded changes. -**Kind**: instance method of [Fabric](#Fabric) -**Returns**: [Fabric](#Fabric) - Returns itself. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [adopt](#Actor+adopt) +**Returns**: [Actor](#Actor) - Instance of the Actor. | Param | Type | Description | | --- | --- | --- | -| source | EventEmitter | Any object which implements the `EventEmitter` pattern. | +| changes | Array | List of [JSONPatch](JSONPatch) operations to apply. | - + -### fabric.compute() ⇒ [Fabric](#Fabric) -Process the current stack. +### logger.commit() ⇒ String +Resolve the current state to a commitment. -**Kind**: instance method of [Fabric](#Fabric) -**Returns**: [Fabric](#Fabric) - Resulting instance of the stack. - - -## Federation -Create and manage sets of signers with the Federation class. - -**Kind**: global class +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [commit](#Actor+commit) +**Returns**: String - 32-byte ID + -* [Federation](#Federation) - * [new Federation([settings])](#new_Federation_new) - * [.start()](#Federation+start) ⇒ [Federation](#Federation) +### logger.export() ⇒ Object +Export the Actor's state to a standard [Object](Object). - +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [export](#Actor+export) +**Returns**: Object - Standard object. + -### new Federation([settings]) -Create an instance of a federation. +### logger.get(path) ⇒ Object +Retrieve a value from the Actor's state by [JSONPointer](JSONPointer) path. -**Returns**: [Federation](#Federation) - Instance of the federation. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [get](#Actor+get) +**Returns**: Object - Value of the path in the Actor's state. | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Settings. | - - - -### federation.start() ⇒ [Federation](#Federation) -Start tracking state (i.e., ready to receive events). - -**Kind**: instance method of [Federation](#Federation) -**Returns**: [Federation](#Federation) - Instance of the Federation. - - -## Filesystem -Interact with a local filesystem. - -**Kind**: global class - -* [Filesystem](#Filesystem) - * [new Filesystem([settings])](#new_Filesystem_new) - * [.ls()](#Filesystem+ls) ⇒ Array - * [.readFile(name)](#Filesystem+readFile) ⇒ Buffer - * [.writeFile(name, content)](#Filesystem+writeFile) ⇒ Boolean - * [._loadFromDisk()](#Filesystem+_loadFromDisk) ⇒ Promise - * [.sync()](#Filesystem+sync) ⇒ [Filesystem](#Filesystem) +| path | String | Path to retrieve using [JSONPointer](JSONPointer). | - + -### new Filesystem([settings]) -Synchronize an [Actor](#Actor) with a local filesystem. +### logger.set(path, value) ⇒ Object +Set a value in the Actor's state by [JSONPointer](JSONPointer) path. -**Returns**: [Filesystem](#Filesystem) - Instance of the Fabric filesystem. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [set](#Actor+set) +**Returns**: Object - Value of the path in the Actor's state. | Param | Type | Description | | --- | --- | --- | -| [settings] | Object | Configuration for the Fabric filesystem. | -| [settings.path] | Object | Path of the local filesystem. | - - - -### filesystem.ls() ⇒ Array -Get the list of files. - -**Kind**: instance method of [Filesystem](#Filesystem) -**Returns**: Array - List of files. - +| path | String | Path to set using [JSONPointer](JSONPointer). | +| value | Object | Value to set. | -### filesystem.readFile(name) ⇒ Buffer -Read a file by name. + -**Kind**: instance method of [Filesystem](#Filesystem) -**Returns**: Buffer - Contents of the file. +### logger.toBuffer() ⇒ Buffer +Casts the Actor to a normalized Buffer. -| Param | Type | Description | -| --- | --- | --- | -| name | String | Name of the file to read. | +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [toBuffer](#Actor+toBuffer) + - +### logger.toGenericMessage() ⇒ Object +Casts the Actor to a generic message, used to uniquely identify the Actor's state. +Fields: +- `preimage`: JSON.stringify(state) +- `hash`: SHA256(preimage) +- `type`: 'FabricActorState' +- `version`: 1 (for now) +- `object`: state +- `parent`: null (for now) -### filesystem.writeFile(name, content) ⇒ Boolean -Write a file by name. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [toGenericMessage](#Actor+toGenericMessage) +**Returns**: Object - Generic message object. +**See** -**Kind**: instance method of [Filesystem](#Filesystem) -**Returns**: Boolean - `true` if the write succeeded, `false` if it did not. +- [https://en.wikipedia.org/wiki/Merkle_tree](https://en.wikipedia.org/wiki/Merkle_tree) +- [https://dev.fabric.pub/messages](https://dev.fabric.pub/messages) -| Param | Type | Description | -| --- | --- | --- | -| name | String | Name of the file to write. | -| content | Buffer | Content of the file. | + - +### logger.toObject() ⇒ Object +Returns the Actor's current state as an [Object](Object). -### filesystem.\_loadFromDisk() ⇒ Promise -Load Filesystem state from disk. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [toObject](#Actor+toObject) + -**Kind**: instance method of [Filesystem](#Filesystem) -**Returns**: Promise - Resolves with Filesystem instance. - +### logger.pause() ⇒ [Actor](#Actor) +Toggles `status` property to paused. -### filesystem.sync() ⇒ [Filesystem](#Filesystem) -Syncronize state from the local filesystem. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [pause](#Actor+pause) +**Returns**: [Actor](#Actor) - Instance of the Actor. + -**Kind**: instance method of [Filesystem](#Filesystem) -**Returns**: [Filesystem](#Filesystem) - Instance of the Fabric filesystem. - +### logger.serialize() ⇒ String +Serialize the Actor's current state into a JSON-formatted string. -## Hash256 -Simple interaction with 256-bit spaces. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [serialize](#Actor+serialize) + -**Kind**: global class +### logger.sign() ⇒ [Actor](#Actor) +Signs the Actor. -* [Hash256](#Hash256) - * [new Hash256(settings)](#new_Hash256_new) - * [.digest(input)](#Hash256.digest) ⇒ String - * [.reverse()](#Hash256.reverse) +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [sign](#Actor+sign) + - +### logger.unpause() ⇒ [Actor](#Actor) +Toggles `status` property to unpaused. -### new Hash256(settings) -Create an instance of a `Hash256` object by calling `new Hash256()`, -where `settings` can be provided to supply a particular input object. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [unpause](#Actor+unpause) +**Returns**: [Actor](#Actor) - Instance of the Actor. + -If the `settings` is not a string, `input` must be provided. +### logger.value([format]) ⇒ Object +Get the inner value of the Actor with an optional cast type. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [value](#Actor+value) +**Returns**: Object - Inner value of the Actor as an [Object](Object), or cast to the requested `format`. -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | | -| settings.input | String | Input string to map as 256-bit hash. | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [format] | String | object | Cast the value to one of: `buffer, hex, json, string` | - + -### Hash256.digest(input) ⇒ String -Produce a SHA256 digest of some input data. +### logger.\_readObject(input) ⇒ Object +Parse an Object into a corresponding Fabric state. -**Kind**: static method of [Hash256](#Hash256) -**Returns**: String - `SHA256(input)` as a hexadecimal string. +**Kind**: instance method of [Logger](#Logger) +**Overrides**: [\_readObject](#Actor+_readObject) +**Returns**: Object - Fabric state. | Param | Type | Description | | --- | --- | --- | -| input | String \| Buffer | Content to digest. | - - - -### Hash256.reverse() -Reverses the bytes of the digest. +| input | Object | Object to read as input. | -**Kind**: static method of [Hash256](#Hash256) - + -## HKDF -Provides an HMAC-based Extract-and-Expand Key Derivation Function (HKDF), compatible with -RFC 5869. Defaults to 32 byte output, matching Bitcoin's implementaton. +## Machine +General-purpose state machine with [Vector](#Vector)-based instructions. **Kind**: global class -* [HKDF](#HKDF) - * [new HKDF(settings)](#new_HKDF_new) - * [.derive([info], [size])](#HKDF+derive) +* [Machine](#Machine) + * [new Machine(settings)](#new_Machine_new) + * [.sip([n])](#Machine+sip) ⇒ Number + * [.slurp([n])](#Machine+slurp) ⇒ Number + * [.compute(input)](#Machine+compute) ⇒ [Machine](#Machine) - + -### new HKDF(settings) -Create an HKDF instance. +### new Machine(settings) +Create a Machine. -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| settings | Object | | List of settings. | -| settings.initial | String | | Input keying material. | -| [settings.algorithm] | String | sha256 | Name of the hashing algorithm to use. | -| [settings.salt] | String | | Salt value (a non-secret random value). | +| Param | Type | Description | +| --- | --- | --- | +| settings | Object | Run-time configuration. | - + -### hkdF.derive([info], [size]) -Derive a new output. +### machine.sip([n]) ⇒ Number +Get `n` bits of deterministic random data. -**Kind**: instance method of [HKDF](#HKDF) +**Kind**: instance method of [Machine](#Machine) +**Returns**: Number - Random bits from [Generator](Generator). | Param | Type | Default | Description | | --- | --- | --- | --- | -| [info] | Buffer | | Context and application specific information. | -| [size] | Number | 32 | Length of output. | - - - -## Identity -Manage a network identity. - -**Kind**: global class - -* [Identity](#Identity) - * [new Identity([settings])](#new_Identity_new) - * [.sign(data)](#Identity+sign) ⇒ Signature - * [.toString()](#Identity+toString) ⇒ String - - - -### new Identity([settings]) -Create an instance of an Identity. - -**Returns**: [Identity](#Identity) - Instance of the identity. - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [settings] | Object | | Settings for the Identity. | -| [settings.seed] | String | | BIP 39 seed phrase. | -| [settings.xprv] | String | | Serialized BIP 32 master private key. | -| [settings.xpub] | String | | Serialized BIP 32 master public key. | -| [settings.account] | Number | 0 | BIP 44 account index. | -| [settings.index] | Number | 0 | BIP 44 key index. | - - - -### identity.sign(data) ⇒ Signature -Sign a buffer of data using BIP 340: https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki - -**Kind**: instance method of [Identity](#Identity) -**Returns**: Signature - Resulting signature (64 bytes). - -| Param | Type | Description | -| --- | --- | --- | -| data | Buffer | Buffer of data to sign. | - - - -### identity.toString() ⇒ String -Retrieve the bech32m-encoded identity. - -**Kind**: instance method of [Identity](#Identity) -**Returns**: String - Public identity. - - -## Interface ⇐ EventEmitter -Interfaces compile abstract contract code into [Chain](#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](#State). | - - -* [Interface](#Interface) ⇐ EventEmitter - * [new Interface(settings)](#new_Interface_new) - * [.log(...inputs)](#Interface+log) - * [.now()](#Interface+now) ⇒ Number - * [.start()](#Interface+start) - * [.stop()](#Interface+stop) - * [.cycle(val)](#Interface+cycle) - - - -### new Interface(settings) -Define an [Interface](#Interface) by creating an instance of this class. - -**Returns**: [Interface](#Interface) - Instance of the [Interface](#Interface). - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Configuration values. | - - - -### interface.log(...inputs) -Log some output to the console. - -**Kind**: instance method of [Interface](#Interface) - -| Param | Type | Description | -| --- | --- | --- | -| ...inputs | any | Components of the message to long. Can be a single {@link} String, many [String](String) objects, or anything else. | - - - -### interface.now() ⇒ Number -Returns current timestamp. - -**Kind**: instance method of [Interface](#Interface) - - -### interface.start() -Start the [Interface](#Interface). - -**Kind**: instance method of [Interface](#Interface) - - -### interface.stop() -Stop the Interface. - -**Kind**: instance method of [Interface](#Interface) - - -### interface.cycle(val) -Ticks the clock with a named [Cycle](Cycle). - -**Kind**: instance method of [Interface](#Interface) - -| Param | Type | Description | -| --- | --- | --- | -| val | String | Name of cycle to scribe. | - - - -## Key -Represents a cryptographic key. - -**Kind**: global class - - -### new Key([settings]) -Create an instance of a Fabric Key, either restoring from some known -values or from prior knowledge. For instance, you can call `new Key()` -to create a fresh keypair, or `new Key({ public: 'deadbeef...' })` to -create it from a known public key. - - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [settings] | Object | | Initialization for the key. | -| [settings.network] | String | | Network string. | -| [settings.seed] | String | | Mnemonic seed for initializing the key. | -| [settings.public] | String | | Public key in hex. | -| [settings.private] | String | | Private key in hex. | -| [settings.purpose] | String | 44 | Constrains derivations to this space. | - - - -## Keystore -Provides an encrypted datastore for generic object storage. - -**Kind**: global class - -* [Keystore](#Keystore) - * [new Keystore([configuration])](#new_Keystore_new) - * [._setState(state)](#Keystore+_setState) ⇒ [Actor](#Actor) - - - -### new Keystore([configuration]) -Create an instance of the Store. - -**Returns**: [Keystore](#Keystore) - Instance of the store. - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [configuration] | FabricStoreConfiguration | | Settings to use. | -| [configuration.name] | String | "DefaultStore" | Name of the Store. | - - - -### keystore.\_setState(state) ⇒ [Actor](#Actor) -Saves an Object to the store. - -**Kind**: instance method of [Keystore](#Keystore) -**Returns**: [Actor](#Actor) - The local instance of the provided State's [Actor](#Actor). - -| Param | Type | Description | -| --- | --- | --- | -| state | Object | State to store. | - - - -## Ledger ⇐ [Scribe](#Scribe) -An ordered stack of pages. - -**Kind**: global class -**Extends**: [Scribe](#Scribe) -**Properties** - -| Name | Type | Description | -| --- | --- | --- | -| memory | Buffer | The ledger's memory (4096 bytes). | -| stack | [Stack](#Stack) | The ledger's stack. | -| tip | Mixed | The most recent page in the ledger. | - - -* [Ledger](#Ledger) ⇐ [Scribe](#Scribe) - * [.append(item)](#Ledger+append) ⇒ Promise - * [.now()](#Scribe+now) ⇒ Number - * [.trust(source)](#Scribe+trust) ⇒ [Scribe](#Scribe) - * [.inherits(scribe)](#Scribe+inherits) ⇒ [Scribe](#Scribe) - * [.toHTML()](#State+toHTML) - * [.toString()](#State+toString) ⇒ String - * [.serialize([input])](#State+serialize) ⇒ Buffer - * [.deserialize(input)](#State+deserialize) ⇒ [State](#State) - * [.fork()](#State+fork) ⇒ [State](#State) - * [.get(path)](#State+get) ⇒ Mixed - * [.set(path)](#State+set) ⇒ Mixed - * [.commit()](#State+commit) - * [.render()](#State+render) ⇒ String - - - -### ledger.append(item) ⇒ Promise -Attempts to append a [Page](Page) to the ledger. - -**Kind**: instance method of [Ledger](#Ledger) -**Returns**: Promise - Resolves after the change has been committed. - -| Param | Type | Description | -| --- | --- | --- | -| item | Mixed | Item to store. | - - - -### ledger.now() ⇒ Number -Retrives the current timestamp, in milliseconds. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [now](#Scribe+now) -**Returns**: Number - [Number](Number) representation of the millisecond [Integer](Integer) value. - - -### ledger.trust(source) ⇒ [Scribe](#Scribe) -Blindly bind event handlers to the [Source](Source). - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [trust](#Scribe+trust) -**Returns**: [Scribe](#Scribe) - Instance of the [Scribe](#Scribe). - -| Param | Type | Description | -| --- | --- | --- | -| source | Source | Event stream. | - - - -### ledger.inherits(scribe) ⇒ [Scribe](#Scribe) -Use an existing Scribe instance as a parent. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [inherits](#Scribe+inherits) -**Returns**: [Scribe](#Scribe) - The configured instance of the Scribe. - -| Param | Type | Description | -| --- | --- | --- | -| scribe | [Scribe](#Scribe) | Instance of Scribe to use as parent. | - - - -### ledger.toHTML() -Converts the State to an HTML document. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [toHTML](#State+toHTML) - - -### ledger.toString() ⇒ String -Unmarshall an existing state to an instance of a [Blob](Blob). - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [toString](#State+toString) -**Returns**: String - Serialized [Blob](Blob). - - -### ledger.serialize([input]) ⇒ Buffer -Convert to [Buffer](Buffer). - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [serialize](#State+serialize) -**Returns**: Buffer - [Store](#Store)-able blob. - -| Param | Type | Description | -| --- | --- | --- | -| [input] | Mixed | Input to serialize. | - - - -### ledger.deserialize(input) ⇒ [State](#State) -Take a hex-encoded input and convert to a [State](#State) object. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [deserialize](#State+deserialize) -**Returns**: [State](#State) - [description] - -| Param | Type | Description | -| --- | --- | --- | -| input | String | [description] | - - - -### ledger.fork() ⇒ [State](#State) -Creates a new child [State](#State), with `@parent` set to -the current [State](#State) by immutable identifier. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [fork](#State+fork) - - -### ledger.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [get](#State+get) - -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | - - - -### ledger.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [set](#State+set) - -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | - - - -### ledger.commit() -Increment the vector clock, broadcast all changes as a transaction. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [commit](#State+commit) - - -### ledger.render() ⇒ String -Compose a JSON string for network consumption. - -**Kind**: instance method of [Ledger](#Ledger) -**Overrides**: [render](#State+render) -**Returns**: String - JSON-encoded [String](String). - - -## Logger ⇐ [Actor](#Actor) -A basic logger that writes logs to the local file system - -**Kind**: global class -**Extends**: [Actor](#Actor) - -* [Logger](#Logger) ⇐ [Actor](#Actor) - * [.path](#Logger+path) ⇒ String - * [.log(msg)](#Logger+log) ⇒ Boolean - * [.start()](#Logger+start) ⇒ Promise - * [.stop()](#Logger+stop) ⇒ Promise - * [.adopt(changes)](#Actor+adopt) ⇒ [Actor](#Actor) - * [.commit()](#Actor+commit) ⇒ String - * [.export()](#Actor+export) ⇒ Object - * [.get(path)](#Actor+get) ⇒ Object - * [.set(path, value)](#Actor+set) ⇒ Object - * [.toBuffer()](#Actor+toBuffer) ⇒ Buffer - * [.toGenericMessage()](#Actor+toGenericMessage) ⇒ Object - * [.toObject()](#Actor+toObject) ⇒ Object - * [.pause()](#Actor+pause) ⇒ [Actor](#Actor) - * [.serialize()](#Actor+serialize) ⇒ String - * [.sign()](#Actor+sign) ⇒ [Actor](#Actor) - * [.unpause()](#Actor+unpause) ⇒ [Actor](#Actor) - * [.value([format])](#Actor+value) ⇒ Object - * [._readObject(input)](#Actor+_readObject) ⇒ Object - - - -### logger.path ⇒ String -Returns the path to the log file - -**Kind**: instance property of [Logger](#Logger) - - -### logger.log(msg) ⇒ Boolean -Writes the specified log to the log file - -**Kind**: instance method of [Logger](#Logger) -**Returns**: Boolean - true, if msg was successfully written; false otherwise - -| Param | Type | Description | -| --- | --- | --- | -| msg | String \| Object | The message to log | - - - -### logger.start() ⇒ Promise -Starts the logger - -This method creates the required directories for writing the log file. - -**Kind**: instance method of [Logger](#Logger) - - -### logger.stop() ⇒ Promise -Stops the logger - -This method closes the log file and returns after it has been closed. Any -errors on close would cause the return promise to be rejected. - -**Kind**: instance method of [Logger](#Logger) - - -### logger.adopt(changes) ⇒ [Actor](#Actor) -Explicitly adopt a set of [JSONPatch](JSONPatch)-encoded changes. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [adopt](#Actor+adopt) -**Returns**: [Actor](#Actor) - Instance of the Actor. - -| Param | Type | Description | -| --- | --- | --- | -| changes | Array | List of [JSONPatch](JSONPatch) operations to apply. | - - - -### logger.commit() ⇒ String -Resolve the current state to a commitment. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [commit](#Actor+commit) -**Returns**: String - 32-byte ID - - -### logger.export() ⇒ Object -Export the Actor's state to a standard [Object](Object). - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [export](#Actor+export) -**Returns**: Object - Standard object. - - -### logger.get(path) ⇒ Object -Retrieve a value from the Actor's state by [JSONPointer](JSONPointer) path. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [get](#Actor+get) -**Returns**: Object - Value of the path in the Actor's state. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | Path to retrieve using [JSONPointer](JSONPointer). | - - - -### logger.set(path, value) ⇒ Object -Set a value in the Actor's state by [JSONPointer](JSONPointer) path. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [set](#Actor+set) -**Returns**: Object - Value of the path in the Actor's state. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | Path to set using [JSONPointer](JSONPointer). | -| value | Object | Value to set. | - - - -### logger.toBuffer() ⇒ Buffer -Casts the Actor to a normalized Buffer. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [toBuffer](#Actor+toBuffer) - - -### logger.toGenericMessage() ⇒ Object -Casts the Actor to a generic message, used to uniquely identify the Actor's state. -Fields: -- `preimage`: JSON.stringify(state) -- `hash`: SHA256(preimage) -- `type`: 'FabricActorState' -- `version`: 1 (for now) -- `object`: state -- `parent`: null (for now) - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [toGenericMessage](#Actor+toGenericMessage) -**Returns**: Object - Generic message object. -**See** - -- [https://en.wikipedia.org/wiki/Merkle_tree](https://en.wikipedia.org/wiki/Merkle_tree) -- [https://dev.fabric.pub/messages](https://dev.fabric.pub/messages) - - - -### logger.toObject() ⇒ Object -Returns the Actor's current state as an [Object](Object). - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [toObject](#Actor+toObject) - - -### logger.pause() ⇒ [Actor](#Actor) -Toggles `status` property to paused. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [pause](#Actor+pause) -**Returns**: [Actor](#Actor) - Instance of the Actor. - - -### logger.serialize() ⇒ String -Serialize the Actor's current state into a JSON-formatted string. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [serialize](#Actor+serialize) - - -### logger.sign() ⇒ [Actor](#Actor) -Signs the Actor. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [sign](#Actor+sign) - - -### logger.unpause() ⇒ [Actor](#Actor) -Toggles `status` property to unpaused. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [unpause](#Actor+unpause) -**Returns**: [Actor](#Actor) - Instance of the Actor. - - -### logger.value([format]) ⇒ Object -Get the inner value of the Actor with an optional cast type. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [value](#Actor+value) -**Returns**: Object - Inner value of the Actor as an [Object](Object), or cast to the requested `format`. - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [format] | String | object | Cast the value to one of: `buffer, hex, json, string` | - - - -### logger.\_readObject(input) ⇒ Object -Parse an Object into a corresponding Fabric state. - -**Kind**: instance method of [Logger](#Logger) -**Overrides**: [\_readObject](#Actor+_readObject) -**Returns**: Object - Fabric state. - -| Param | Type | Description | -| --- | --- | --- | -| input | Object | Object to read as input. | - - - -## Machine -General-purpose state machine with [Vector](#Vector)-based instructions. - -**Kind**: global class - -* [Machine](#Machine) - * [new Machine(settings)](#new_Machine_new) - * [.sip([n])](#Machine+sip) ⇒ Number - * [.slurp([n])](#Machine+slurp) ⇒ Number - * [.compute(input)](#Machine+compute) ⇒ [Machine](#Machine) - - - -### new Machine(settings) -Create a Machine. - - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Run-time configuration. | - - - -### machine.sip([n]) ⇒ Number -Get `n` bits of deterministic random data. - -**Kind**: instance method of [Machine](#Machine) -**Returns**: Number - Random bits from [Generator](Generator). - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [n] | Number | 128 | Number of bits to retrieve. | - - - -### machine.slurp([n]) ⇒ Number -Get `n` bytes of deterministic random data. - -**Kind**: instance method of [Machine](#Machine) -**Returns**: Number - Random bytes from [Generator](Generator). - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [n] | Number | 32 | Number of bytes to retrieve. | - - - -### machine.compute(input) ⇒ [Machine](#Machine) -Computes the next "step" for our current Vector. Analagous to `sum`. -The top item on the stack is always the memory held at current position, -so counts should always begin with 0. - -**Kind**: instance method of [Machine](#Machine) -**Returns**: [Machine](#Machine) - Instance of the resulting machine. - -| Param | Type | Description | -| --- | --- | --- | -| input | Object | Value to pass as input. | - - - -## Mempool -Stores a list of [Transaction](Transaction) elements. - -**Kind**: global class -**Emits**: event:{Message} confirmed Emitted when the Mempool has dropped a transaction. - - -### new Mempool(settings) -Creates an instance of a [Mempool](#Mempool) [Service](#Service). - - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Map of settings to utilize. | - - - -## Message : Object -The [Message](#Message) type defines the Application Messaging Protocol, or AMP. -Each [Actor](#Actor) in the network receives and broadcasts messages, -selectively disclosing new routes to peers which may have open circuits. - -**Kind**: global class - -* [Message](#Message) : Object - * [new Message(message)](#new_Message_new) - * [.asRaw()](#Message+asRaw) ⇒ Buffer - * [.sign()](#Message+sign) ⇒ [Message](#Message) - * [.verify()](#Message+verify) ⇒ Boolean - * [._setSigner(signer)](#Message+_setSigner) ⇒ [Message](#Message) - - - -### new Message(message) -The `Message` type is standardized in [Fabric](#Fabric) as a [Array](Array), which can be added to any other vector to compute a resulting state. - -**Returns**: [Message](#Message) - Instance of the message. - -| Param | Type | Description | -| --- | --- | --- | -| message | Object | Message vector. Will be serialized by [Array#_serialize](Array#_serialize). | - - - -### message.asRaw() ⇒ Buffer -Returns a [Buffer](Buffer) of the complete message. - -**Kind**: instance method of [Message](#Message) -**Returns**: Buffer - Buffer of the encoded [Message](#Message). - - -### message.sign() ⇒ [Message](#Message) -Signs the message using the associated signer. - -**Kind**: instance method of [Message](#Message) -**Returns**: [Message](#Message) - Signed message. - - -### message.verify() ⇒ Boolean -Verify a message's signature. - -**Kind**: instance method of [Message](#Message) -**Returns**: Boolean - `true` if the signature is valid, `false` if not. - - -### message.\_setSigner(signer) ⇒ [Message](#Message) -Sets the signer for the message. - -**Kind**: instance method of [Message](#Message) -**Returns**: [Message](#Message) - Instance of the Message with associated signer. - -| Param | Type | Description | -| --- | --- | --- | -| signer | [Signer](#Signer) | Signer instance. | - - - -## Node -Full definition of a Fabric node. - -**Kind**: global class - -* [Node](#Node) - * [new Node(settings)](#new_Node_new) - * [.trust(source, settings)](#Node+trust) - - - -### new Node(settings) -Manage a Fabric service. - -**Returns**: [Node](#Node) - Instance of the managed service. - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Configuration for the node. | - - - -### node.trust(source, settings) -Explicitly trusts an [EventEmitter](EventEmitter). - -**Kind**: instance method of [Node](#Node) - -| Param | Type | Description | -| --- | --- | --- | -| source | EventEmitter | Actor to listen to. | -| settings | Object \| String | Label for the trusted messages, or a configuration object. | - - - -## Oracle ⇐ [Store](#Store) -An Oracle manages one or more collections, using a mempool for -transitive state. - -**Kind**: global class -**Extends**: [Store](#Store) - -* [Oracle](#Oracle) ⇐ [Store](#Store) - * [new Oracle(initial)](#new_Oracle_new) - * [.broadcast(msg)](#Oracle+broadcast) ⇒ Boolean - * [._REGISTER(obj)](#Store+_REGISTER) ⇒ [Vector](#Vector) - * [._POST(key, value)](#Store+_POST) ⇒ Promise - * [.get(key)](#Store+get) ⇒ Promise - * [.set(key, value)](#Store+set) - * [.trust(source)](#Store+trust) ⇒ [Store](#Store) - * [.del(key)](#Store+del) - * [.flush()](#Store+flush) - * [.start()](#Store+start) ⇒ Promise - - - -### new Oracle(initial) -Trusted point-of-reference for external services. - - -| Param | Type | Description | -| --- | --- | --- | -| initial | Object | Initialization vector. | - - - -### oracle.broadcast(msg) ⇒ Boolean -Core messaging function for interacting with this object in system-time. - -**Kind**: instance method of [Oracle](#Oracle) -**Returns**: Boolean - Returns `true` on success, `false` on failure. - -| Param | Type | Description | -| --- | --- | --- | -| msg | [Message](#Message) | Instance of a [module:Message](module:Message) object, validated then transmitted verbatim. | - - - -### oracle.\_REGISTER(obj) ⇒ [Vector](#Vector) -Registers an [Actor](#Actor). Necessary to store in a collection. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [\_REGISTER](#Store+_REGISTER) -**Returns**: [Vector](#Vector) - Returned from `storage.set` - -| Param | Type | Description | -| --- | --- | --- | -| obj | Object | Instance of the object to store. | - - - -### oracle.\_POST(key, value) ⇒ Promise -Insert something into a collection. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [\_POST](#Store+_POST) -**Returns**: Promise - Resolves on success with a String pointer. - -| Param | Type | Description | -| --- | --- | --- | -| key | String | Path to add data to. | -| value | Mixed | Object to store. | - - - -### oracle.get(key) ⇒ Promise -Barebones getter. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [get](#Store+get) -**Returns**: Promise - Resolves on complete. `null` if not found. - -| Param | Type | Description | -| --- | --- | --- | -| key | String | Name of data to retrieve. | - - - -### oracle.set(key, value) -Set a `key` to a specific `value`. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [set](#Store+set) - -| Param | Type | Description | -| --- | --- | --- | -| key | String | Address of the information. | -| value | Mixed | Content to store at `key`. | - - - -### oracle.trust(source) ⇒ [Store](#Store) -Implicitly trust an [Event](Event) source. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [trust](#Store+trust) -**Returns**: [Store](#Store) - Resulting instance of [Store](#Store) with new trust. - -| Param | Type | Description | -| --- | --- | --- | -| source | EventEmitter | Event-emitting source. | - - - -### oracle.del(key) -Remove a [Value](#Value) by [Path](#Path). - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [del](#Store+del) - -| Param | Type | Description | -| --- | --- | --- | -| key | [Path](#Path) | Key to remove. | - - - -### oracle.flush() -Wipes the storage. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [flush](#Store+flush) - - -### oracle.start() ⇒ Promise -Start running the process. - -**Kind**: instance method of [Oracle](#Oracle) -**Overrides**: [start](#Store+start) -**Returns**: Promise - Resolves on complete. - - -## Path -A [Path](#Path) is a [Fabric](#Fabric)-native link to a [Document](Document) -within the network. - -**Kind**: global class - -* [Path](#Path) - * [new Path(input)](#new_Path_new) - * [.isValid()](#Path+isValid) ⇒ Boolean - - - -### new Path(input) -Create a new [Path](#Path). - - -| Param | Type | Description | -| --- | --- | --- | -| input | String \| Object | Named path. | - - - -### path.isValid() ⇒ Boolean -**Kind**: instance method of [Path](#Path) -**Returns**: Boolean - Whether or not the Path is valid. - - -## Peer -An in-memory representation of a node in our network. - -**Kind**: global class - -* [Peer](#Peer) - * [new Peer([config])](#new_Peer_new) - * ~~[.address](#Peer+address)~~ - * [.broadcast(message)](#Peer+broadcast) - * [._connect(target)](#Peer+_connect) - * [._fillPeerSlots()](#Peer+_fillPeerSlots) ⇒ [Peer](#Peer) - * [._handleFabricMessage(buffer)](#Peer+_handleFabricMessage) ⇒ [Peer](#Peer) - * [.start()](#Peer+start) - * [.stop()](#Peer+stop) - * [.listen()](#Peer+listen) ⇒ [Peer](#Peer) - - - -### new Peer([config]) -Create an instance of [Peer](#Peer). - - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [config] | Object | | Initialization Vector for this peer. | -| [config.listen] | Boolean | | Whether or not to listen for connections. | -| [config.upnp] | Boolean | | Whether or not to use UPNP for automatic configuration. | -| [config.port] | Number | 7777 | Port to use for P2P connections. | -| [config.peers] | Array | [] | List of initial peers. | - - - -### ~~peer.address~~ -***Deprecated*** - -**Kind**: instance property of [Peer](#Peer) - - -### peer.broadcast(message) -Write a [Buffer](Buffer) to all connected peers. - -**Kind**: instance method of [Peer](#Peer) - -| Param | Type | Description | -| --- | --- | --- | -| message | Buffer | Message buffer to send. | - - - -### peer.\_connect(target) -Open a Fabric connection to the target address and initiate the Fabric Protocol. - -**Kind**: instance method of [Peer](#Peer) - -| Param | Type | Description | -| --- | --- | --- | -| target | String | Target address. | - - - -### peer.\_fillPeerSlots() ⇒ [Peer](#Peer) -Attempt to fill available connection slots with new peers. - -**Kind**: instance method of [Peer](#Peer) -**Returns**: [Peer](#Peer) - Instance of the peer. - - -### peer.\_handleFabricMessage(buffer) ⇒ [Peer](#Peer) -Handle a Fabric [Message](#Message) buffer. - -**Kind**: instance method of [Peer](#Peer) -**Returns**: [Peer](#Peer) - Instance of the Peer. - -| Param | Type | -| --- | --- | -| buffer | Buffer | - - - -### peer.start() -Start the Peer. - -**Kind**: instance method of [Peer](#Peer) - - -### peer.stop() -Stop the peer. - -**Kind**: instance method of [Peer](#Peer) - - -### peer.listen() ⇒ [Peer](#Peer) -Start listening for connections. - -**Kind**: instance method of [Peer](#Peer) -**Returns**: [Peer](#Peer) - Chainable method. - - -## Reader -Read from a byte stream, seeking valid Fabric messages. - -**Kind**: global class - - -### new Reader(settings) -Create an instance of a [Reader](#Reader), which can listen to a byte stream -for valid Fabric messages. - - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Settings for the stream. | - - - -## Remote : [Remote](#Remote) -Interact with a remote [Resource](#Resource). This is currently the only -HTTP-related code that should remain in @fabric/core — all else must -be moved to @fabric/http before final release! - -**Kind**: global class -**Properties** - -| Name | Type | -| --- | --- | -| config | Object | -| secure | Boolean | - - -* [Remote](#Remote) : [Remote](#Remote) - * [new Remote(target)](#new_Remote_new) - * [.enumerate()](#Remote+enumerate) ⇒ Configuration - * [.request(type, path, [params])](#Remote+request) ⇒ FabricHTTPResult - * [._PUT(path, body)](#Remote+_PUT) ⇒ FabricHTTPResult \| String - * [._GET(path, params)](#Remote+_GET) ⇒ FabricHTTPResult \| String - * [._POST(path, params)](#Remote+_POST) ⇒ FabricHTTPResult \| String - * [._OPTIONS(path, params)](#Remote+_OPTIONS) ⇒ Object - * [._PATCH(path, body)](#Remote+_PATCH) ⇒ Object - * [._DELETE(path, params)](#Remote+_DELETE) ⇒ Object - - - -### new Remote(target) -An in-memory representation of a node in our network. - - -| Param | Type | Description | -| --- | --- | --- | -| target | Object | Target object. | -| target.host | String | Named host, e.g. "localhost". | -| target.secure | String | Require TLS session. | - - - -### remote.enumerate() ⇒ Configuration -Enumerate the available Resources on the remote host. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: Configuration - An object with enumerable key/value pairs for the Application Resource Contract. - - -### remote.request(type, path, [params]) ⇒ FabricHTTPResult -Make an HTTP request to the configured authority. - -**Kind**: instance method of [Remote](#Remote) - -| Param | Type | Description | -| --- | --- | --- | -| type | String | One of `GET`, `PUT`, `POST`, `DELETE`, or `OPTIONS`. | -| path | String | The path to request from the authority. | -| [params] | Object | Options. | - - - -### remote.\_PUT(path, body) ⇒ FabricHTTPResult \| String -HTTP PUT against the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: FabricHTTPResult \| String - Result of request. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| body | Object | Map of parameters to supply. | - - - -### remote.\_GET(path, params) ⇒ FabricHTTPResult \| String -HTTP GET against the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: FabricHTTPResult \| String - Result of request. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| params | Object | Map of parameters to supply. | - - - -### remote.\_POST(path, params) ⇒ FabricHTTPResult \| String -HTTP POST against the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: FabricHTTPResult \| String - Result of request. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| params | Object | Map of parameters to supply. | - - - -### remote.\_OPTIONS(path, params) ⇒ Object -HTTP OPTIONS on the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: Object - - Full description of remote resource. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| params | Object | Map of parameters to supply. | - - - -### remote.\_PATCH(path, body) ⇒ Object -HTTP PATCH on the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: Object - - Full description of remote resource. - -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| body | Object | Map of parameters to supply. | - - - -### remote.\_DELETE(path, params) ⇒ Object -HTTP DELETE on the configured Authority. - -**Kind**: instance method of [Remote](#Remote) -**Returns**: Object - - Full description of remote resource. +| [n] | Number | 128 | Number of bits to retrieve. | -| Param | Type | Description | -| --- | --- | --- | -| path | String | HTTP Path to request. | -| params | Object | Map of parameters to supply. | + - +### machine.slurp([n]) ⇒ Number +Get `n` bytes of deterministic random data. -## Resource -Generic interface for collections of digital objects. +**Kind**: instance method of [Machine](#Machine) +**Returns**: Number - Random bytes from [Generator](Generator). -**Kind**: global class +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [n] | Number | 32 | Number of bytes to retrieve. | -* [Resource](#Resource) - * [new Resource(definition)](#new_Resource_new) - * [.create(obj)](#Resource+create) ⇒ [Vector](#Vector) - * [.update(id, update)](#Resource+update) ⇒ [Vector](#Vector) + - +### machine.compute(input) ⇒ [Machine](#Machine) +Computes the next "step" for our current Vector. Analagous to `sum`. +The top item on the stack is always the memory held at current position, +so counts should always begin with 0. -### new Resource(definition) +**Kind**: instance method of [Machine](#Machine) +**Returns**: [Machine](#Machine) - Instance of the resulting machine. | Param | Type | Description | | --- | --- | --- | -| definition | Object | Initial parameters | +| input | Object | Value to pass as input. | - + -### resource.create(obj) ⇒ [Vector](#Vector) -Create an instance of the Resource's type. +## Message : Object +The [Message](#Message) type defines the Application Messaging Protocol, or AMP. +Each [Actor](#Actor) in the network receives and broadcasts messages, +selectively disclosing new routes to peers which may have open circuits. -**Kind**: instance method of [Resource](#Resource) -**Returns**: [Vector](#Vector) - Resulting Vector with deterministic identifier. +**Kind**: global class -| Param | Type | Description | -| --- | --- | --- | -| obj | Object | Map of the instance's properties and values. | +* [Message](#Message) : Object + * [new Message(message)](#new_Message_new) + * [.asRaw()](#Message+asRaw) ⇒ Buffer + * [.sign()](#Message+sign) ⇒ [Message](#Message) + * [.verify()](#Message+verify) ⇒ Boolean + * [._setSigner(signer)](#Message+_setSigner) ⇒ [Message](#Message) - + -### resource.update(id, update) ⇒ [Vector](#Vector) -Modify an existing instance of a Resource by its unique identifier. Produces a new instance. +### new Message(message) +The `Message` type is standardized in [Fabric](#Fabric) as a [Array](Array), which can be added to any other vector to compute a resulting state. -**Kind**: instance method of [Resource](#Resource) -**Returns**: [Vector](#Vector) - Resulting Vector instance with updated identifier. +**Returns**: [Message](#Message) - Instance of the message. | Param | Type | Description | | --- | --- | --- | -| id | String | Unique ID to update. | -| update | Object | Map of change to make (keys -> values). | +| message | Object | Message vector. Will be serialized by [Array#_serialize](Array#_serialize). | + + - +### message.asRaw() ⇒ Buffer +Returns a [Buffer](Buffer) of the complete message. -## Router ⇐ [Scribe](#Scribe) -Process incoming messages. +**Kind**: instance method of [Message](#Message) +**Returns**: Buffer - Buffer of the encoded [Message](#Message). + -**Kind**: global class -**Extends**: [Scribe](#Scribe) +### message.sign() ⇒ [Message](#Message) +Signs the message using the associated signer. -* [Router](#Router) ⇐ [Scribe](#Scribe) - * [new Router(map)](#new_Router_new) - * [.route(msg)](#Router+route) ⇒ Array - * [.use(plugin, name)](#Router+use) ⇒ [Router](#Router) - * [.now()](#Scribe+now) ⇒ Number - * [.trust(source)](#Scribe+trust) ⇒ [Scribe](#Scribe) - * [.inherits(scribe)](#Scribe+inherits) ⇒ [Scribe](#Scribe) - * [.toHTML()](#State+toHTML) - * [.toString()](#State+toString) ⇒ String - * [.serialize([input])](#State+serialize) ⇒ Buffer - * [.deserialize(input)](#State+deserialize) ⇒ [State](#State) - * [.fork()](#State+fork) ⇒ [State](#State) - * [.get(path)](#State+get) ⇒ Mixed - * [.set(path)](#State+set) ⇒ Mixed - * [.commit()](#State+commit) - * [.render()](#State+render) ⇒ String +**Kind**: instance method of [Message](#Message) +**Returns**: [Message](#Message) - Signed message. + - +### message.verify() ⇒ Boolean +Verify a message's signature. + +**Kind**: instance method of [Message](#Message) +**Returns**: Boolean - `true` if the signature is valid, `false` if not. + -### new Router(map) -Maintains a list of triggers ("commands") and their behaviors. +### message.\_setSigner(signer) ⇒ [Message](#Message) +Sets the signer for the message. +**Kind**: instance method of [Message](#Message) +**Returns**: [Message](#Message) - Instance of the Message with associated signer. | Param | Type | Description | | --- | --- | --- | -| map | Object | Map of command names => behaviors. | +| signer | [Signer](#Signer) | Signer instance. | - + -### router.route(msg) ⇒ Array -Assembles a list of possible responses to the incoming request. +## Peer +An in-memory representation of a node in our network. -**Kind**: instance method of [Router](#Router) -**Returns**: Array - List of outputs generated from the input string. +**Kind**: global class -| Param | Type | Description | -| --- | --- | --- | -| msg | String | Input message to route. | +* [Peer](#Peer) + * [new Peer([config])](#new_Peer_new) + * ~~[.address](#Peer+address)~~ + * [.broadcast(message)](#Peer+broadcast) + * [._connect(target)](#Peer+_connect) + * [._fillPeerSlots()](#Peer+_fillPeerSlots) ⇒ [Peer](#Peer) + * [._handleFabricMessage(buffer)](#Peer+_handleFabricMessage) ⇒ [Peer](#Peer) + * [.start()](#Peer+start) + * [.stop()](#Peer+stop) + * [.listen()](#Peer+listen) ⇒ [Peer](#Peer) - + -### router.use(plugin, name) ⇒ [Router](#Router) -Attaches a new handler to the router. +### new Peer([config]) +Create an instance of [Peer](#Peer). -**Kind**: instance method of [Router](#Router) -**Returns**: [Router](#Router) - Configured instance of the router. -| Param | Type | Description | -| --- | --- | --- | -| plugin | Plugin | Instance of the plugin. | -| name | Plugin.name | Name of the plugin. | +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [config] | Object | | Initialization Vector for this peer. | +| [config.listen] | Boolean | | Whether or not to listen for connections. | +| [config.upnp] | Boolean | | Whether or not to use UPNP for automatic configuration. | +| [config.port] | Number | 7777 | Port to use for P2P connections. | +| [config.peers] | Array | [] | List of initial peers. | - + -### router.now() ⇒ Number -Retrives the current timestamp, in milliseconds. +### ~~peer.address~~ +***Deprecated*** -**Kind**: instance method of [Router](#Router) -**Overrides**: [now](#Scribe+now) -**Returns**: Number - [Number](Number) representation of the millisecond [Integer](Integer) value. - +**Kind**: instance property of [Peer](#Peer) + -### router.trust(source) ⇒ [Scribe](#Scribe) -Blindly bind event handlers to the [Source](Source). +### peer.broadcast(message) +Write a [Buffer](Buffer) to all connected peers. -**Kind**: instance method of [Router](#Router) -**Overrides**: [trust](#Scribe+trust) -**Returns**: [Scribe](#Scribe) - Instance of the [Scribe](#Scribe). +**Kind**: instance method of [Peer](#Peer) | Param | Type | Description | | --- | --- | --- | -| source | Source | Event stream. | +| message | Buffer | Message buffer to send. | - + -### router.inherits(scribe) ⇒ [Scribe](#Scribe) -Use an existing Scribe instance as a parent. +### peer.\_connect(target) +Open a Fabric connection to the target address and initiate the Fabric Protocol. -**Kind**: instance method of [Router](#Router) -**Overrides**: [inherits](#Scribe+inherits) -**Returns**: [Scribe](#Scribe) - The configured instance of the Scribe. +**Kind**: instance method of [Peer](#Peer) | Param | Type | Description | | --- | --- | --- | -| scribe | [Scribe](#Scribe) | Instance of Scribe to use as parent. | +| target | String | Target address. | - + -### router.toHTML() -Converts the State to an HTML document. +### peer.\_fillPeerSlots() ⇒ [Peer](#Peer) +Attempt to fill available connection slots with new peers. -**Kind**: instance method of [Router](#Router) -**Overrides**: [toHTML](#State+toHTML) - +**Kind**: instance method of [Peer](#Peer) +**Returns**: [Peer](#Peer) - Instance of the peer. + -### router.toString() ⇒ String -Unmarshall an existing state to an instance of a [Blob](Blob). +### peer.\_handleFabricMessage(buffer) ⇒ [Peer](#Peer) +Handle a Fabric [Message](#Message) buffer. -**Kind**: instance method of [Router](#Router) -**Overrides**: [toString](#State+toString) -**Returns**: String - Serialized [Blob](Blob). - +**Kind**: instance method of [Peer](#Peer) +**Returns**: [Peer](#Peer) - Instance of the Peer. -### router.serialize([input]) ⇒ Buffer -Convert to [Buffer](Buffer). +| Param | Type | +| --- | --- | +| buffer | Buffer | -**Kind**: instance method of [Router](#Router) -**Overrides**: [serialize](#State+serialize) -**Returns**: Buffer - [Store](#Store)-able blob. + -| Param | Type | Description | -| --- | --- | --- | -| [input] | Mixed | Input to serialize. | +### peer.start() +Start the Peer. - +**Kind**: instance method of [Peer](#Peer) + -### router.deserialize(input) ⇒ [State](#State) -Take a hex-encoded input and convert to a [State](#State) object. +### peer.stop() +Stop the peer. -**Kind**: instance method of [Router](#Router) -**Overrides**: [deserialize](#State+deserialize) -**Returns**: [State](#State) - [description] +**Kind**: instance method of [Peer](#Peer) + -| Param | Type | Description | -| --- | --- | --- | -| input | String | [description] | +### peer.listen() ⇒ [Peer](#Peer) +Start listening for connections. - +**Kind**: instance method of [Peer](#Peer) +**Returns**: [Peer](#Peer) - Chainable method. + -### router.fork() ⇒ [State](#State) -Creates a new child [State](#State), with `@parent` set to -the current [State](#State) by immutable identifier. +## Reader +Read from a byte stream, seeking valid Fabric messages. -**Kind**: instance method of [Router](#Router) -**Overrides**: [fork](#State+fork) - +**Kind**: global class + -### router.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). +### new Reader(settings) +Create an instance of a [Reader](#Reader), which can listen to a byte stream +for valid Fabric messages. -**Kind**: instance method of [Router](#Router) -**Overrides**: [get](#State+get) | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | - - - -### router.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. +| settings | Object | Settings for the stream. | -**Kind**: instance method of [Router](#Router) -**Overrides**: [set](#State+set) + -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +## Remote : [Remote](#Remote) +Interact with a remote [Resource](#Resource). This is currently the only +HTTP-related code that should remain in @fabric/core — all else must +be moved to @fabric/http before final release! - +**Kind**: global class +**Properties** -### router.commit() -Increment the vector clock, broadcast all changes as a transaction. +| Name | Type | +| --- | --- | +| config | Object | +| secure | Boolean | -**Kind**: instance method of [Router](#Router) -**Overrides**: [commit](#State+commit) - -### router.render() ⇒ String -Compose a JSON string for network consumption. +* [Remote](#Remote) : [Remote](#Remote) + * [new Remote(target)](#new_Remote_new) + * [.enumerate()](#Remote+enumerate) ⇒ Configuration + * [.request(type, path, [params])](#Remote+request) ⇒ FabricHTTPResult + * [._PUT(path, body)](#Remote+_PUT) ⇒ FabricHTTPResult \| String + * [._GET(path, params)](#Remote+_GET) ⇒ FabricHTTPResult \| String + * [._POST(path, params)](#Remote+_POST) ⇒ FabricHTTPResult \| String + * [._OPTIONS(path, params)](#Remote+_OPTIONS) ⇒ Object + * [._PATCH(path, body)](#Remote+_PATCH) ⇒ Object + * [._DELETE(path, params)](#Remote+_DELETE) ⇒ Object -**Kind**: instance method of [Router](#Router) -**Overrides**: [render](#State+render) -**Returns**: String - JSON-encoded [String](String). - + -## Scribe ⇐ [State](#State) -Simple tag-based recordkeeper. +### new Remote(target) +An in-memory representation of a node in our network. -**Kind**: global class -**Extends**: [State](#State) -**Properties** -| Name | Type | Description | +| Param | Type | Description | | --- | --- | --- | -| config | Object | Current configuration. | +| target | Object | Target object. | +| target.host | String | Named host, e.g. "localhost". | +| target.secure | String | Require TLS session. | + -* [Scribe](#Scribe) ⇐ [State](#State) - * [new Scribe(config)](#new_Scribe_new) - * [.now()](#Scribe+now) ⇒ Number - * [.trust(source)](#Scribe+trust) ⇒ [Scribe](#Scribe) - * [.inherits(scribe)](#Scribe+inherits) ⇒ [Scribe](#Scribe) - * [.toHTML()](#State+toHTML) - * [.toString()](#State+toString) ⇒ String - * [.serialize([input])](#State+serialize) ⇒ Buffer - * [.deserialize(input)](#State+deserialize) ⇒ [State](#State) - * [.fork()](#State+fork) ⇒ [State](#State) - * [.get(path)](#State+get) ⇒ Mixed - * [.set(path)](#State+set) ⇒ Mixed - * [.commit()](#State+commit) - * [.render()](#State+render) ⇒ String +### remote.enumerate() ⇒ Configuration +Enumerate the available Resources on the remote host. - +**Kind**: instance method of [Remote](#Remote) +**Returns**: Configuration - An object with enumerable key/value pairs for the Application Resource Contract. + -### new Scribe(config) -The "Scribe" is a simple tag-based recordkeeper. +### remote.request(type, path, [params]) ⇒ FabricHTTPResult +Make an HTTP request to the configured authority. +**Kind**: instance method of [Remote](#Remote) | Param | Type | Description | | --- | --- | --- | -| config | Object | General configuration object. | -| config.verbose | Boolean | Should the Scribe be noisy? | +| type | String | One of `GET`, `PUT`, `POST`, `DELETE`, or `OPTIONS`. | +| path | String | The path to request from the authority. | +| [params] | Object | Options. | - + -### scribe.now() ⇒ Number -Retrives the current timestamp, in milliseconds. +### remote.\_PUT(path, body) ⇒ FabricHTTPResult \| String +HTTP PUT against the configured Authority. -**Kind**: instance method of [Scribe](#Scribe) -**Returns**: Number - [Number](Number) representation of the millisecond [Integer](Integer) value. - +**Kind**: instance method of [Remote](#Remote) +**Returns**: FabricHTTPResult \| String - Result of request. -### scribe.trust(source) ⇒ [Scribe](#Scribe) -Blindly bind event handlers to the [Source](Source). +| Param | Type | Description | +| --- | --- | --- | +| path | String | HTTP Path to request. | +| body | Object | Map of parameters to supply. | -**Kind**: instance method of [Scribe](#Scribe) -**Returns**: [Scribe](#Scribe) - Instance of the [Scribe](#Scribe). + + +### remote.\_GET(path, params) ⇒ FabricHTTPResult \| String +HTTP GET against the configured Authority. + +**Kind**: instance method of [Remote](#Remote) +**Returns**: FabricHTTPResult \| String - Result of request. | Param | Type | Description | | --- | --- | --- | -| source | Source | Event stream. | +| path | String | HTTP Path to request. | +| params | Object | Map of parameters to supply. | - + -### scribe.inherits(scribe) ⇒ [Scribe](#Scribe) -Use an existing Scribe instance as a parent. +### remote.\_POST(path, params) ⇒ FabricHTTPResult \| String +HTTP POST against the configured Authority. -**Kind**: instance method of [Scribe](#Scribe) -**Returns**: [Scribe](#Scribe) - The configured instance of the Scribe. +**Kind**: instance method of [Remote](#Remote) +**Returns**: FabricHTTPResult \| String - Result of request. | Param | Type | Description | | --- | --- | --- | -| scribe | [Scribe](#Scribe) | Instance of Scribe to use as parent. | +| path | String | HTTP Path to request. | +| params | Object | Map of parameters to supply. | - + -### scribe.toHTML() -Converts the State to an HTML document. +### remote.\_OPTIONS(path, params) ⇒ Object +HTTP OPTIONS on the configured Authority. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [toHTML](#State+toHTML) - +**Kind**: instance method of [Remote](#Remote) +**Returns**: Object - - Full description of remote resource. -### scribe.toString() ⇒ String -Unmarshall an existing state to an instance of a [Blob](Blob). +| Param | Type | Description | +| --- | --- | --- | +| path | String | HTTP Path to request. | +| params | Object | Map of parameters to supply. | -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [toString](#State+toString) -**Returns**: String - Serialized [Blob](Blob). - + -### scribe.serialize([input]) ⇒ Buffer -Convert to [Buffer](Buffer). +### remote.\_PATCH(path, body) ⇒ Object +HTTP PATCH on the configured Authority. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [serialize](#State+serialize) -**Returns**: Buffer - [Store](#Store)-able blob. +**Kind**: instance method of [Remote](#Remote) +**Returns**: Object - - Full description of remote resource. | Param | Type | Description | | --- | --- | --- | -| [input] | Mixed | Input to serialize. | +| path | String | HTTP Path to request. | +| body | Object | Map of parameters to supply. | - + -### scribe.deserialize(input) ⇒ [State](#State) -Take a hex-encoded input and convert to a [State](#State) object. +### remote.\_DELETE(path, params) ⇒ Object +HTTP DELETE on the configured Authority. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [deserialize](#State+deserialize) -**Returns**: [State](#State) - [description] +**Kind**: instance method of [Remote](#Remote) +**Returns**: Object - - Full description of remote resource. | Param | Type | Description | | --- | --- | --- | -| input | String | [description] | +| path | String | HTTP Path to request. | +| params | Object | Map of parameters to supply. | - + -### scribe.fork() ⇒ [State](#State) -Creates a new child [State](#State), with `@parent` set to -the current [State](#State) by immutable identifier. +## Resource +Generic interface for collections of digital objects. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [fork](#State+fork) - +**Kind**: global class -### scribe.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). +* [Resource](#Resource) + * [new Resource(definition)](#new_Resource_new) + * [.create(obj)](#Resource+create) ⇒ [Vector](#Vector) + * [.update(id, update)](#Resource+update) ⇒ [Vector](#Vector) -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [get](#State+get) + + +### new Resource(definition) | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| definition | Object | Initial parameters | - + -### scribe.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. +### resource.create(obj) ⇒ [Vector](#Vector) +Create an instance of the Resource's type. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [set](#State+set) +**Kind**: instance method of [Resource](#Resource) +**Returns**: [Vector](#Vector) - Resulting Vector with deterministic identifier. | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| obj | Object | Map of the instance's properties and values. | - + -### scribe.commit() -Increment the vector clock, broadcast all changes as a transaction. +### resource.update(id, update) ⇒ [Vector](#Vector) +Modify an existing instance of a Resource by its unique identifier. Produces a new instance. -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [commit](#State+commit) - +**Kind**: instance method of [Resource](#Resource) +**Returns**: [Vector](#Vector) - Resulting Vector instance with updated identifier. -### scribe.render() ⇒ String -Compose a JSON string for network consumption. +| Param | Type | Description | +| --- | --- | --- | +| id | String | Unique ID to update. | +| update | Object | Map of change to make (keys -> values). | -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [render](#State+render) -**Returns**: String - JSON-encoded [String](String). ## Script @@ -3184,7 +1910,7 @@ familiar semantics. * [Service](#Service) - * [new Service(settings)](#new_Service_new) + * [new Service([settings])](#new_Service_new) * [.init()](#Service+init) * [.tick()](#Service+tick) ⇒ Number * [.beat()](#Service+beat) ⇒ [Service](#Service) @@ -3193,6 +1919,7 @@ familiar semantics. * [.trust(source)](#Service+trust) ⇒ [Service](#Service) * [.handler(message)](#Service+handler) ⇒ [Service](#Service) * [.lock([duration])](#Service+lock) ⇒ Boolean + * [.when(event, method)](#Service+when) ⇒ EventEmitter * [.route(msg)](#Service+route) ⇒ Promise * [.start()](#Service+start) * [._GET(path)](#Service+_GET) ⇒ Promise @@ -3204,15 +1931,14 @@ familiar semantics. -### new Service(settings) +### new Service([settings]) Create an instance of a Service. | Param | Type | Default | Description | | --- | --- | --- | --- | -| settings | Object | | Configuration for this service. | +| [settings] | Object | | Configuration for this service. | | [settings.networking] | Boolean | true | Whether or not to connect to the network. | -| [settings.@data] | Object | | Internal data to assign. | | [settings.frequency] | Object | | Interval frequency in hertz. | | [settings.state] | Object | | Initial state to assign. | @@ -3246,7 +1972,7 @@ Retrieve a key from the [State](#State). | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -3257,7 +1983,7 @@ Set a key in the [State](#State) to a particular value. | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -3296,6 +2022,19 @@ Attempt to acquire a lock for `duration` seconds. | --- | --- | --- | --- | | [duration] | Number | 1000 | Number of milliseconds to hold lock. | + + +### service.when(event, method) ⇒ EventEmitter +Bind a method to an event, with current state as the immutable context. + +**Kind**: instance method of [Service](#Service) +**Returns**: EventEmitter - Instance of EventEmitter. + +| Param | 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) `event` is encountered. | + ### service.route(msg) ⇒ Promise @@ -3783,7 +2522,7 @@ Retrieve a key from the [State](#State). | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -3794,7 +2533,7 @@ Set a key in the [State](#State) to a particular value. | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -3922,13 +2661,13 @@ Implicitly trust an [Event](Event) source. ### store.del(key) -Remove a [Value](#Value) by [Path](#Path). +Remove a [Value](#Value) by [Path](Path). **Kind**: instance method of [Store](#Store) | Param | Type | Description | | --- | --- | --- | -| key | [Path](#Path) | Key to remove. | +| key | Path | Key to remove. | @@ -3943,43 +2682,6 @@ Start running the process. **Kind**: instance method of [Store](#Store) **Returns**: Promise - Resolves on complete. - - -## Swap : Object -The [Swap](#Swap) contract executes a set of transactions on two distinct -[Chain](#Chain) components, utilizing a secret-reveal mechanism to atomically -execute either the full set or none. - -**Kind**: global class - -* [Swap](#Swap) : Object - * [new Swap([settings])](#new_Swap_new) - * [.extractSecret(tx, address)](#Swap+extractSecret) ⇒ Mixed - - - -### new Swap([settings]) -Atomically execute a set of transactions across two [Chain](#Chain) components. - - -| Param | Type | Default | Description | -| --- | --- | --- | --- | -| [settings] | Object | {} | Configuration for the swap. | - - - -### swap.extractSecret(tx, address) ⇒ Mixed -Find an input from the provided transaction which spends from the target -P2SH address. - -**Kind**: instance method of [Swap](#Swap) -**Returns**: Mixed - False on failure, secret value on success. - -| Param | Type | Description | -| --- | --- | --- | -| tx | Transaction | [Transaction](Transaction) to iterate over. | -| address | String | P2SH address to search for. | - ## Swarm : String @@ -4040,21 +2742,6 @@ Create a new Fabric Token. | --- | --- | --- | | [settings] | Object | Configuration. | - - -## Transition -The [Transition](#Transition) type reflects a change from one finite -[State](#State) to another. - -**Kind**: global class - - -### new Transition(settings) - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Configuration for the transition object. | - ## Tree @@ -4354,7 +3041,7 @@ Create a crowdfunding transaction. ### wallet.\_getSwapInputScript(redeemScript, secret) -Generate [Script](#Script) for claiming a [Swap](#Swap). +Generate [Script](#Script) for claiming a [Swap](Swap). **Kind**: instance method of [Wallet](#Wallet) @@ -4366,7 +3053,7 @@ Generate [Script](#Script) for claiming a [Swap](#Swap). ### wallet.\_getRefundInputScript(redeemScript) -Generate [Script](#Script) for reclaiming funds commited to a [Swap](#Swap). +Generate [Script](#Script) for reclaiming funds commited to a [Swap](Swap). **Kind**: instance method of [Wallet](#Wallet) @@ -4478,6 +3165,7 @@ Manages interaction with the Bitcoin network. * [.trust(source)](#Service+trust) ⇒ [Service](#Service) * [.handler(message)](#Service+handler) ⇒ [Service](#Service) * [.lock([duration])](#Service+lock) ⇒ Boolean + * [.when(event, method)](#Service+when) ⇒ EventEmitter * [.route(msg)](#Service+route) ⇒ Promise * [._GET(path)](#Service+_GET) ⇒ Promise * [._PUT(path, value, [commit])](#Service+_PUT) ⇒ Promise @@ -4711,7 +3399,7 @@ Retrieve a key from the [State](#State). | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -4723,7 +3411,7 @@ Set a key in the [State](#State) to a particular value. | Param | Type | Description | | --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | +| path | Path | Key to retrieve. | @@ -4765,6 +3453,20 @@ Attempt to acquire a lock for `duration` seconds. | --- | --- | --- | --- | | [duration] | Number | 1000 | Number of milliseconds to hold lock. | + + +### bitcoin.when(event, method) ⇒ EventEmitter +Bind a method to an event, with current state as the immutable context. + +**Kind**: instance method of [Bitcoin](#Bitcoin) +**Overrides**: [when](#Service+when) +**Returns**: EventEmitter - Instance of EventEmitter. + +| Param | 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) `event` is encountered. | + ### bitcoin.route(msg) ⇒ Promise @@ -4845,27 +3547,6 @@ Sends a message. | --- | --- | --- | | message | Mixed | Message to send. | - - -## Exchange -Implements a basic Exchange. - -**Kind**: global class - - -### new Exchange(settings) -Create an instance of the Exchange. You may run two instances at -once to simulate two-party contracts, or use the Fabric Market to -find and trade with real peers. - -**Returns**: Exchnge - -| Param | Type | Description | -| --- | --- | --- | -| settings | Object | Map of settings to values. | -| settings.fees | Object | Map of fee settings (all values in BTC). | -| settings.fees.minimum | Object | Minimum fee (satoshis). | - ## Lightning @@ -4903,7 +3584,7 @@ Make an RPC request through the Lightning UNIX socket. ## Redis -Connect and subscribe to ZeroMQ servers. +Connect and subscribe to Redis servers. **Kind**: global class @@ -4915,7 +3596,7 @@ Connect and subscribe to ZeroMQ servers. ### new Redis([settings]) -Creates an instance of a ZeroMQ subscriber. +Creates an instance of a Redis subscriber. **Returns**: [Redis](#Redis) - Instance of the Redis service, ready to run `start()` @@ -4923,7 +3604,7 @@ Creates an instance of a ZeroMQ subscriber. | --- | --- | --- | | [settings] | Object | Settings for the Redis connection. | | [settings.host] | String | Host for the Redis server. | -| [settings.port] | Number | Remote ZeroMQ service port. | +| [settings.port] | Number | Remote Redis service port. | @@ -4996,30 +3677,9 @@ Deprecated 2021-11-06. **Kind**: global class * ~~[Scribe](#Scribe)~~ - * [new Scribe(config)](#new_Scribe_new) * [.now()](#Scribe+now) ⇒ Number * [.trust(source)](#Scribe+trust) ⇒ [Scribe](#Scribe) * [.inherits(scribe)](#Scribe+inherits) ⇒ [Scribe](#Scribe) - * [.toHTML()](#State+toHTML) - * [.toString()](#State+toString) ⇒ String - * [.serialize([input])](#State+serialize) ⇒ Buffer - * [.deserialize(input)](#State+deserialize) ⇒ [State](#State) - * [.fork()](#State+fork) ⇒ [State](#State) - * [.get(path)](#State+get) ⇒ Mixed - * [.set(path)](#State+set) ⇒ Mixed - * [.commit()](#State+commit) - * [.render()](#State+render) ⇒ String - - - -### new Scribe(config) -The "Scribe" is a simple tag-based recordkeeper. - - -| Param | Type | Description | -| --- | --- | --- | -| config | Object | General configuration object. | -| config.verbose | Boolean | Should the Scribe be noisy? | @@ -5052,94 +3712,6 @@ Use an existing Scribe instance as a parent. | --- | --- | --- | | scribe | [Scribe](#Scribe) | Instance of Scribe to use as parent. | - - -### scribe.toHTML() -Converts the State to an HTML document. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [toHTML](#State+toHTML) - - -### scribe.toString() ⇒ String -Unmarshall an existing state to an instance of a [Blob](Blob). - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [toString](#State+toString) -**Returns**: String - Serialized [Blob](Blob). - - -### scribe.serialize([input]) ⇒ Buffer -Convert to [Buffer](Buffer). - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [serialize](#State+serialize) -**Returns**: Buffer - [Store](#Store)-able blob. - -| Param | Type | Description | -| --- | --- | --- | -| [input] | Mixed | Input to serialize. | - - - -### scribe.deserialize(input) ⇒ [State](#State) -Take a hex-encoded input and convert to a [State](#State) object. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [deserialize](#State+deserialize) -**Returns**: [State](#State) - [description] - -| Param | Type | Description | -| --- | --- | --- | -| input | String | [description] | - - - -### scribe.fork() ⇒ [State](#State) -Creates a new child [State](#State), with `@parent` set to -the current [State](#State) by immutable identifier. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [fork](#State+fork) - - -### scribe.get(path) ⇒ Mixed -Retrieve a key from the [State](#State). - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [get](#State+get) - -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | - - - -### scribe.set(path) ⇒ Mixed -Set a key in the [State](#State) to a particular value. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [set](#State+set) - -| Param | Type | Description | -| --- | --- | --- | -| path | [Path](#Path) | Key to retrieve. | - - - -### scribe.commit() -Increment the vector clock, broadcast all changes as a transaction. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [commit](#State+commit) - - -### scribe.render() ⇒ String -Compose a JSON string for network consumption. - -**Kind**: instance method of [Scribe](#Scribe) -**Overrides**: [render](#State+render) -**Returns**: String - JSON-encoded [String](String). ## ~~Stash~~ diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 28d77dcbc..8b85c7957 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -5,7 +5,7 @@ applications, so grab a coffee ☕ and settle in. ## Quick Start See also [`QUICKSTART.md`][quickstart-guide] for up-to-date instructions. -0. `nvm use 18.19.0` (you can get `nvm` from [nvm.sh][nvm-official]) +0. `nvm use 18.19.1` (you can get `nvm` from [nvm.sh][nvm-official]) 1. `npm install -g @fabric/core` to add `fabric` to your path 2. (optional) `fabric setup` to set up your environment (generates a new master key) 3. `fabric` should now be enough to get you up and running! diff --git a/GOALS.md b/GOALS.md index 909f7a7e4..f264369b0 100644 --- a/GOALS.md +++ b/GOALS.md @@ -17,7 +17,7 @@ and no mission succeeds without a clearly-defined set of goals. ## Current Goals These are our immediate goals: -- [ ] Find all TODO items (run script, check diff) +- [x] Find all TODO items (run script, check diff) - [ ] Audit all documentation - [ ] Check all hyperlinks on `npm run dev` - [ ] 100% test coverage diff --git a/INSTALL.md b/INSTALL.md index 38b6e86e6..d8cd77cc6 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,6 +1,6 @@ # Installing Fabric ## Prerequisites -- Node.js 18.19.0 +- Node.js 18.19.1 ## Quick Start You can install Fabric by running: @@ -24,8 +24,8 @@ By default, the Fabric CLI connects to `playnet` for an initial set of peers. Y ## Notes If you don't have Node.js, or an incorrect version, we recommend [installing NVM][installing-nvm]. Once complete, you can install and set the default node version: ``` -nvm install 18.19.0 -nvm alias default 18.19.0 # optional +nvm install 18.19.1 +nvm alias default 18.19.1 # optional ``` [installing-nvm]: https://nvm.sh diff --git a/QUICKSTART.md b/QUICKSTART.md index c450d2cb9..af43e1aba 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -2,7 +2,7 @@ ## Prerequisites 0. (optional) Install NVM: `https://nvm.sh` -1. Install Node 18.19.0 (use `nvm install 18.19.0` if using `nvm`) +1. Install Node 18.19.1 (use `nvm install 18.19.1` if using `nvm`) ## Instructions 0. Meet the prerequisites (above) diff --git a/README.md b/README.md index 59e76be63..a62ad6396 100644 --- a/README.md +++ b/README.md @@ -145,8 +145,7 @@ Either Fabric libraries or projects running Fabric, this list encompasses the mo | [`labs.fabric.pub`](https://labs.fabric.pub) | | [`grove.chat`][chat] | | `sensemaker.io` | | | `FALSE` -| `verse.pub` -| `trynovo.com` | | | `FALSE` +| `verse.pub` | | | ## Learning More The best place to get started is in [the #learning channel][learning], a @@ -154,12 +153,17 @@ collection of empassioned educators eager to help you. Fabric on Twitter: [@FabricProtocol][twitter] +[fabric]: fabric: + [bitcoin]: https://bitcoin.org [build-guide]: BUILD.md [chat]: https://grove.chat +[chat-help]: https://grove.chat/#/room/#help:fabric.pub [chat-support]: https://grove.chat/#/room/#help:fabric.pub [coverage]: https://codecov.io/gh/FabricLabs/fabric [development]: https://grove.chat/#/room/#development:fabric.pub +[fabric-fm]: https://fabric.fm +[fabric-pub]: https://fabric.pub [fabric-github]: https://github.com/FabricLabs/fabric [fabric-http]: https://github.com/FabricLabs/fabric-http [protocol]: PROTOCOL.md diff --git a/constants.js b/constants.js index e772deb60..f7d935970 100644 --- a/constants.js +++ b/constants.js @@ -93,6 +93,7 @@ const P2P_MUSIG_SEND_PROPOSAL = 0x4223; const P2P_MUSIG_REPLY_TO_PROPOSAL = 0x4224; const P2P_MUSIG_ACCEPT_PROPOSAL = 0x4225; +// Message Types const PEER_CANDIDATE = 0x09; // TODO: should be 0x02 for Bitcoin P2P const BLOCK_CANDIDATE = 0x03; @@ -117,6 +118,9 @@ const ZERO_LENGTH_PLAINTEXT = ''; // HTTP const HTTP_HEADER_CONTENT_TYPE = 'application/json'; +// UI +const INPUT_HINT = 'Press the "i" key to begin typing.'; + // CommonJS Support module.exports = { PEER_PORT, @@ -137,6 +141,7 @@ module.exports = { LARGE_COLLECTION_SIZE, BLOCK_CANDIDATE, CHAT_MESSAGE, + INPUT_HINT, ZERO_LENGTH_PLAINTEXT, FABRIC_PLAYNET_ADDRESS, FABRIC_PLAYNET_ORIGIN, diff --git a/docs/Actor.html b/docs/Actor.html index e4132cc80..2294bbe56 100644 --- a/docs/Actor.html +++ b/docs/Actor.html @@ -455,7 +455,7 @@

Methods

-

(static) fromAny(input) → {Actor}

+

_readObject(input) → {Object}

@@ -463,7 +463,7 @@

(static) from
- Create an Actor from a variety of formats. + Parse an Object into a corresponding Fabric state.
@@ -515,7 +515,7 @@

Parameters:
- Target Object to create. + Object to read as input. @@ -558,7 +558,7 @@
Parameters:
@@ -589,7 +589,7 @@
Returns:
- Instance of the Actor. + Fabric state.
@@ -600,7 +600,7 @@
Returns:
- Actor + Object
@@ -618,7 +618,7 @@
Returns:
-

(static) randomBytes(countopt) → {Buffer}

+

adopt(changes) → {Actor}

@@ -626,7 +626,7 @@

(static)
- Get a number of random bytes from the runtime environment. + Explicitly adopt a set of JSONPatch-encoded changes.
@@ -650,13 +650,9 @@

Parameters:
Type - Attributes - Default - - Description @@ -666,24 +662,13 @@
Parameters:
- count + changes - Number - - - - - - - - - <optional>
- - + Array @@ -691,14 +676,9 @@
Parameters:
- - - 32 - - - Number of random bytes to retrieve. + List of JSONPatch operations to apply. @@ -741,7 +721,7 @@
Parameters:
@@ -772,7 +752,7 @@
Returns:
- The random bytes. + Instance of the Actor.
@@ -783,7 +763,7 @@
Returns:
- Buffer + Actor
@@ -801,7 +781,7 @@
Returns:
-

_readObject(input) → {Object}

+

commit() → {String}

@@ -809,7 +789,7 @@

_readObjec
- Parse an Object into a corresponding Fabric state. + Resolve the current state to a commitment.
@@ -820,53 +800,118 @@

_readObjec -

Parameters:
- - - - +
-
- - - - - - - - - - -
NameTypeDescription
input - Object - Object to read as input.
+ + +
Source:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + +
+ 32-byte ID +
+ + + +
+
+ Type +
+
+ + String + + +
+
+ + + + + + + + + + + + + +

export() → {Object}

+ + + + + + +
+ Export the Actor's state to a standard Object. +
+ + + + + + + @@ -904,7 +949,7 @@
Parameters:
@@ -935,7 +980,7 @@
Returns:
- Fabric state. + Standard object.
@@ -964,7 +1009,7 @@
Returns:
-

adopt(changes) → {Actor}

+

get(path) → {Object}

@@ -972,7 +1017,7 @@

adopt - Explicitly adopt a set of JSONPatch-encoded changes. + Retrieve a value from the Actor's state by JSONPointer path. @@ -1008,13 +1053,13 @@
Parameters:
- changes + path - Array + String @@ -1024,7 +1069,7 @@
Parameters:
- List of JSONPatch operations to apply. + Path to retrieve using JSONPointer. @@ -1067,7 +1112,7 @@
Parameters:
@@ -1098,7 +1143,7 @@
Returns:
- Instance of the Actor. + Value of the path in the Actor's state.
@@ -1109,7 +1154,7 @@
Returns:
- Actor + Object
@@ -1127,7 +1172,7 @@
Returns:
-

commit() → {String}

+

pause() → {Actor}

@@ -1135,7 +1180,7 @@

commit - Resolve the current state to a commitment. + Toggles `status` property to paused. @@ -1181,7 +1226,7 @@

commit @@ -1212,7 +1257,7 @@
Returns:
- 32-byte ID + Instance of the Actor.
@@ -1223,7 +1268,7 @@
Returns:
- String + Actor
@@ -1241,7 +1286,7 @@
Returns:
-

export() → {Object}

+

serialize() → {String}

@@ -1249,7 +1294,7 @@

export - Export the Actor's state to a standard Object. + Serialize the Actor's current state into a JSON-formatted string. @@ -1295,7 +1340,7 @@

export @@ -1325,10 +1370,6 @@

exportReturns:

-
- Standard object. -
-
@@ -1337,7 +1378,7 @@
Returns:
- Object + String
@@ -1355,7 +1396,7 @@
Returns:
-

get(path) → {Object}

+

set(path, value) → {Object}

@@ -1363,7 +1404,7 @@

get - Retrieve a value from the Actor's state by JSONPointer path. + Set a value in the Actor's state by JSONPointer path. @@ -1415,7 +1456,30 @@
Parameters:
- Path to retrieve using JSONPointer. + Path to set using JSONPointer. + + + + + + + value + + + + + + Object + + + + + + + + + + Value to set. @@ -1458,7 +1522,7 @@
Parameters:
@@ -1518,7 +1582,7 @@
Returns:
-

pause() → {Actor}

+

sign() → {Actor}

@@ -1526,7 +1590,7 @@

pause - Toggles `status` property to paused. + Signs the Actor. @@ -1572,7 +1636,7 @@

pause @@ -1602,10 +1666,6 @@

pauseReturns:

-
- Instance of the Actor. -
-
@@ -1632,7 +1692,7 @@
Returns:
-

serialize() → {String}

+

toBuffer() → {Buffer}

@@ -1640,7 +1700,7 @@

serialize - Serialize the Actor's current state into a JSON-formatted string. + Casts the Actor to a normalized Buffer. @@ -1686,7 +1746,7 @@

serialize @@ -1724,7 +1784,7 @@
Returns:
- String + Buffer
@@ -1742,7 +1802,7 @@
Returns:
-

set(path, value) → {Object}

+

toGenericMessage() → {Object}

@@ -1750,7 +1810,14 @@

set - Set a value in the Actor's state by JSONPointer path. + Casts the Actor to a generic message, used to uniquely identify the Actor's state. + Fields: + - `preimage`: JSON.stringify(state) + - `hash`: SHA256(preimage) + - `type`: 'FabricActorState' + - `version`: 1 (for now) + - `object`: state + - `parent`: null (for now) @@ -1761,78 +1828,6 @@

set - - - - Name - - - Type - - - - - - Description - - - - - - - - - path - - - - - - String - - - - - - - - - - Path to set using JSONPointer. - - - - - - - value - - - - - - Object - - - - - - - - - - Value to set. - - - - - - - @@ -1868,7 +1863,7 @@
Parameters:
@@ -1877,6 +1872,15 @@
Parameters:
+
See:
+
+ +
+

@@ -1899,7 +1903,7 @@
Returns:
- Value of the path in the Actor's state. + Generic message object.
@@ -1928,7 +1932,7 @@
Returns:
-

sign() → {Actor}

+

toObject() → {Object}

@@ -1936,7 +1940,7 @@

sign - Signs the Actor. + Returns the Actor's current state as an Object. @@ -1982,7 +1986,7 @@

sign @@ -2020,7 +2024,7 @@
Returns:
- Actor + Object
@@ -2038,7 +2042,7 @@
Returns:
-

toBuffer() → {Buffer}

+

unpause() → {Actor}

@@ -2046,7 +2050,7 @@

toBuffer - Casts the Actor to a normalized Buffer. + Toggles `status` property to unpaused. @@ -2092,7 +2096,7 @@

toBuffer @@ -2122,6 +2126,10 @@

toBufferReturns:

+
+ Instance of the Actor. +
+
@@ -2130,7 +2138,7 @@
Returns:
- Buffer + Actor
@@ -2148,7 +2156,7 @@
Returns:
-

toGenericMessage() → {Object}

+

value(formatopt) → {Object}

@@ -2156,7 +2164,7 @@

toGen
- Casts the Actor to a generic message. + Get the inner value of the Actor with an optional cast type.
@@ -2167,90 +2175,80 @@

toGen +

Parameters:
+ + + - -
- - - - - - - - - - - - - - - +
+ + + + + + + -
Source:
-
- -
+ + + + + -
- Generic message object. -
+ + + +
NameTypeAttributesDefaultDescription
format + String - + + <optional>
+
+ object -
Returns:
+
Cast the value to one of: `buffer, hex, json, string`
-
-
- Type -
-
- Object -
-
+
@@ -2262,16 +2260,12 @@
Returns:
-

toObject() → {Object}

-
- Returns the Actor's current state as an Object. -
@@ -2281,14 +2275,22 @@

toObjectSource: +
+ +
-
+
@@ -2304,22 +2306,26 @@

toObjectReturns:

+
+ Inner value of the Actor as an Object, or cast to the requested `format`. +
+
+
+ Type +
+
+ Object -
Source:
-
-
+
@@ -2327,68 +2333,78 @@

toObject +

(static) fromAny(input) → {Actor}

+
+ Create an Actor from a variety of formats. +
-
Returns:
-
-
- Type -
-
- Object +
Parameters:
-
-
+ + + + + + + + + + -

unpause() → {Actor}

+ + + + + +
NameTypeDescription
input + Object -
- Toggles `status` property to unpaused. -
+ +
Target Object to create.
@@ -2426,7 +2442,7 @@

unpause @@ -2457,7 +2473,7 @@
Returns:
- Instance of the Actor. + Instance of the Actor.
@@ -2486,7 +2502,7 @@
Returns:
-

value(formatopt) → {Object}

+

(static) randomBytes(countopt) → {Buffer}

@@ -2494,7 +2510,7 @@

value - Get the inner value of the Actor with an optional cast type. + Get a number of random bytes from the runtime environment. @@ -2534,13 +2550,13 @@
Parameters:
- format + count - String + Number @@ -2561,12 +2577,12 @@
Parameters:
- object + 32 - Cast the value to one of: `buffer, hex, json, string` + Number of random bytes to retrieve. @@ -2609,7 +2625,7 @@
Parameters:
@@ -2640,7 +2656,7 @@
Returns:
- Inner value of the Actor as an Object, or cast to the requested `format`. + The random bytes.
@@ -2651,7 +2667,7 @@
Returns:
- Object + Buffer
@@ -2681,44 +2697,32 @@

Home

Classes

@@ -3279,34 +140,24 @@
Parameters:
+ -
Returns:
-
- Store-able blob. -
-
-
- Type -
-
- Buffer -
-
+

Methods

@@ -3314,7 +165,7 @@
Returns:
-

set(path) → {Mixed}

+

inherits(scribe) → {Scribe}

@@ -3322,7 +173,7 @@

set - Set a key in the State to a particular value. + Use an existing Scribe instance as a parent. @@ -3358,13 +209,13 @@
Parameters:
- path + scribe - Path + Scribe @@ -3374,7 +225,7 @@
Parameters:
- Key to retrieve. + Instance of Scribe to use as parent. @@ -3395,15 +246,6 @@
Parameters:
-
Overrides:
-
- -
- @@ -3426,7 +268,7 @@
Parameters:
@@ -3456,6 +298,10 @@
Parameters:
Returns:
+
+ The configured instance of the Scribe. +
+
@@ -3464,98 +310,10 @@
Returns:
- Mixed - - -
-
- - - - - - - - - - - - - -

toHTML()

- - - - - - -
- Converts the State to an HTML document. -
- - - - - - - - - - - - - -
- - - - - - - - -
Overrides:
-
- -
- - - - - - - - - - - - - - - - - + Scribe -
Source:
-
-
- - - - - - -
@@ -3570,20 +328,7 @@

toHTMLtoString() → {String}

+

now() → {Number}

@@ -3591,7 +336,7 @@

toString - Unmarshall an existing state to an instance of a Blob. + Retrives the current timestamp, in milliseconds. @@ -3615,15 +360,6 @@

toStringOverrides: -
- -
- @@ -3646,7 +382,7 @@

toString @@ -3677,7 +413,7 @@
Returns:
- Serialized Blob. + Number representation of the millisecond Integer value.
@@ -3688,7 +424,7 @@
Returns:
- String + Number
@@ -3809,7 +545,7 @@
Parameters:
@@ -3881,44 +617,32 @@

Home

Classes

  • Actor
  • -
  • Aggregator
  • -
  • App
  • Bitcoin
  • +
  • CLI
  • Chain
  • Channel
  • Circuit
  • -
  • CLI
  • Collection
  • -
  • Compiler
  • -
  • Consensus
  • -
  • Entity
  • Environment
  • -
  • Exchange
  • Fabric
  • Federation
  • Filesystem
  • -
  • Hash256
  • HKDF
  • HTTPServer
  • +
  • Hash256
  • Identity
  • Interface
  • Key
  • -
  • Keystore
  • Ledger
  • Lightning
  • Logger
  • Machine
  • -
  • Mempool
  • Message
  • -
  • Node
  • -
  • Oracle
  • -
  • Path
  • Peer
  • Reader
  • Redis
  • Remote
  • Resource
  • -
  • Router
  • Scribe
  • Script
  • Service
  • @@ -3929,9 +653,8 @@

    Classes

  • Stash
  • State
  • Store
  • -
  • Swap
  • Swarm
  • -
  • Transition
  • +
  • Token
  • Tree
  • Value
  • Vector
  • diff --git a/docs/Script.html b/docs/Script.html index 1ad43ebe6..d1f9c0c1b 100644 --- a/docs/Script.html +++ b/docs/Script.html @@ -237,44 +237,32 @@

    Home

    Classes

    • Actor
    • -
    • Aggregator
    • -
    • App
    • Bitcoin
    • +
    • CLI
    • Chain
    • Channel
    • Circuit
    • -
    • CLI
    • Collection
    • -
    • Compiler
    • -
    • Consensus
    • -
    • Entity
    • Environment
    • -
    • Exchange
    • Fabric
    • Federation
    • Filesystem
    • -
    • Hash256
    • HKDF
    • HTTPServer
    • +
    • Hash256
    • Identity
    • Interface
    • Key
    • -
    • Keystore
    • Ledger
    • Lightning
    • Logger
    • Machine
    • -
    • Mempool
    • Message
    • -
    • Node
    • -
    • Oracle
    • -
    • Path
    • Peer
    • Reader
    • Redis
    • Remote
    • Resource
    • -
    • Router
    • Scribe
    • Script
    • Service
    • @@ -285,9 +273,8 @@

      Classes

    • Stash
    • State
    • Store
    • -
    • Swap
    • Swarm
    • -
    • Transition
    • +
    • Token
    • Tree
    • Value
    • Vector
    • diff --git a/docs/Service.html b/docs/Service.html index d9acb8a85..872b9c025 100644 --- a/docs/Service.html +++ b/docs/Service.html @@ -33,7 +33,7 @@

      Class: Service

      -

      (protected) Service(settings)

      +

      (protected) Service(settingsopt)

      The "Service" is a simple model for processing messages in a distributed system. Service instances are public interfaces for outside systems, @@ -57,7 +57,7 @@

      Constructor

      -

      (protected) new Service(settings)

      +

      (protected) new Service(settingsopt)

      @@ -89,6 +89,8 @@
      Parameters:
      Type + Attributes + @@ -114,6 +116,16 @@
      Parameters:
      + + + <optional>
      + + + + + + + @@ -186,7 +198,44 @@
      Properties
      - @data + frequency + + + + + + Object + + + + + + + + + <optional>
      + + + + + + + + + + + + + + + Interval frequency in hertz. + + + + + + + state @@ -216,7 +265,7 @@
      Properties
      - Internal data to assign. + Initial state to assign. @@ -313,7 +362,7 @@
      Properties:
      @@ -474,7 +523,7 @@
      Parameters:
      @@ -727,7 +776,7 @@
      Parameters:
      @@ -890,7 +939,7 @@
      Parameters:
      @@ -1053,7 +1102,7 @@
      Parameters:
      @@ -1145,7 +1194,7 @@

      beat @@ -1317,7 +1366,7 @@
      Parameters:
      @@ -1480,7 +1529,7 @@
      Parameters:
      @@ -1510,6 +1559,10 @@
      Parameters:
      Returns:
      +
      + Returns the target value if found, otherwise null. +
      +
      @@ -1640,7 +1693,7 @@
      Parameters:
      @@ -1755,7 +1808,7 @@

      init @@ -1916,7 +1969,7 @@
      Parameters:
      @@ -2079,7 +2132,7 @@
      Parameters:
      @@ -2265,7 +2318,7 @@
      Parameters:
      @@ -2428,7 +2481,7 @@
      Parameters:
      @@ -2539,7 +2592,7 @@

      (async) start @@ -2631,7 +2684,7 @@

      tick @@ -2790,7 +2843,7 @@
      Parameters:
      @@ -2850,6 +2903,192 @@
      Returns:
      +

      when(event, method) → {EventEmitter}

      + + + + + + +
      + Bind a method to an event, with current state as the immutable context. +
      + + + + + + + + + +
      Parameters:
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeDescription
      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.
      + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Source:
      +
      + +
      + + + + + + + +
      + + + + + + + + + + + + + + + +
      Returns:
      + + +
      + Instance of EventEmitter. +
      + + + +
      +
      + Type +
      +
      + + EventEmitter + + +
      +
      + + + + + + + + + + + + + @@ -2862,44 +3101,32 @@

      Home

      Classes

      @@ -2089,7 +2105,7 @@

      toObject @@ -2208,7 +2224,7 @@

      unpause @@ -2400,7 +2416,7 @@
      Parameters:
      @@ -2472,44 +2488,32 @@

      Home

      Classes

      @@ -842,13 +798,36 @@
      Parameters:
      - fund + redeemScript - Object + * + + + + + + + + + + + + + + + + + secret + + + + + + * @@ -901,7 +880,7 @@
      Parameters:
      @@ -939,7 +918,7 @@
      Parameters:
      -

      (async) _getRefundInputScript(redeemScript)

      +

      _load(settings)

      @@ -947,7 +926,7 @@

      (async)
      - Generate Script for reclaiming funds commited to a Swap. + Initialize the wallet, including keys and addresses.
      @@ -983,13 +962,13 @@
      Parameters:
      - redeemScript + settings - * + Object @@ -999,7 +978,7 @@
      Parameters:
      - + Settings to load. @@ -1042,7 +1021,7 @@
      Parameters:
      @@ -1080,7 +1059,7 @@
      Parameters:
      -

      (async) _getSwapInputScript(redeemScript, secret)

      +

      (async) _sign(tx)

      @@ -1088,7 +1067,7 @@

      (async) <
      - Generate Script for claiming a Swap. + Signs a transaction with the keyring.
      @@ -1124,36 +1103,13 @@
      Parameters:
      - redeemScript - - - - - - * - - - - - - - - - - - - - - - - - secret + tx - * + BcoinTX @@ -1206,7 +1162,7 @@
      Parameters:
      @@ -1244,7 +1200,7 @@
      Parameters:
      -

      _load(settings)

      +

      (async) createPricedOrder(order)

      @@ -1252,7 +1208,7 @@

      _load - Initialize the wallet, including keys and addresses. + Create a priced order. @@ -1288,7 +1244,7 @@
      Parameters:
      - settings + order @@ -1304,7 +1260,79 @@
      Parameters:
      - Settings to load. + +
      Properties
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameTypeDescription
      asset + + + Object + + + +
      amount + + + Object + + + +
      + + @@ -1347,7 +1375,7 @@
      Parameters:
      @@ -1385,7 +1413,7 @@
      Parameters:
      -

      (async) _sign(tx)

      +

      getAddressForScript(script)

      @@ -1393,7 +1421,7 @@

      (async) _sign - Signs a transaction with the keyring. + Returns a bech32 address for the provided Script. @@ -1429,13 +1457,13 @@
      Parameters:
      - tx + script - BcoinTX + Script @@ -1488,7 +1516,7 @@
      Parameters:
      @@ -1526,7 +1554,7 @@
      Parameters:
      -

      (async) createPricedOrder(order)

      +

      getAddressFromRedeemScript(redeemScript)

      @@ -1534,7 +1562,7 @@

      (async) - Create a priced order. + Generate a BitcoinAddress for the supplied BitcoinScript. @@ -1570,13 +1598,13 @@
      Parameters:
      - order + redeemScript - Object + BitcoinScript @@ -1586,91 +1614,73 @@
      Parameters:
      - -
      Properties
      + + - - - + +
      - Name - Type +
      - Description - - - - - asset - - Object - - - - - amount - - Object +
      Source:
      +
      + +
      - +
      - - - - - - - - -
      @@ -1685,121 +1695,159 @@
      Properties
      +

      loadKey(keypair) → {Wallet}

      +
      + Import a key to the wallet. +
      -
      Source:
      -
      - -
      +
      Parameters:
      + + + + - + + + + + + + + +
      NameTypeDescription
      keypair + Object + Keypair. +
      Properties
      + + + + -

      getAddressForScript(script)

      + + -
      - Returns a bech32 address for the provided Script. -
      + + + + + + + @@ -1842,7 +1890,7 @@
      Parameters:
      @@ -1869,18 +1917,40 @@
      Parameters:
      +
      Returns:
      + + +
      + Instance of the Wallet. +
      + +
      +
      + Type +
      +
      + Wallet +
      +
      -

      getAddressFromRedeemScript(redeemScript)

      + + + + + + + +

      publicKeyFromString(input)

      @@ -1888,7 +1958,7 @@

      - Generate a BitcoinAddress for the supplied BitcoinScript. + Create a public key from a string. @@ -1924,13 +1994,13 @@
      Parameters:

      - + + @@ -1983,7 +2053,7 @@
      Parameters:
      @@ -2021,7 +2091,7 @@
      Parameters:
      -

      loadKey(keypair) → {Wallet}

      +

      start()

      @@ -2029,7 +2099,7 @@

      loadKey - Import a key to the wallet. + Start the wallet, including listening for transactions. @@ -2040,140 +2110,140 @@

      loadKeyParameters:

      -

      NameTypeAttributesDescription
      public -
      Parameters:
      + Buffer - - - - + - + - - + - - - + + - - Script + + + Buffer + - + + + + + + + + + + + +
      NameType - Description
      scriptPublic key.
      +
      private - + + <optional>
      + + + + + +
      Private key.
      + +
      redeemScriptinput - BitcoinScript + String @@ -1940,7 +2010,7 @@
      Parameters:
      -
      Hex-encoded string to create key from.
      - - - +
      -
      - - - - - - - - + + + + + + @@ -2216,7 +2286,7 @@
      Properties
      @@ -2247,7 +2317,7 @@
      Returns:
      - Instance of the Wallet. + The seed object.
      @@ -2258,7 +2328,7 @@
      Returns:
      - Wallet + FabricSeed
      @@ -2276,7 +2346,7 @@
      Returns:
      -

      publicKeyFromString(input)

      +

      (static) fromSeed(seed) → {Wallet}

      @@ -2284,7 +2354,7 @@

      pu
      - Create a public key from a string. + Create a new Wallet from a seed object.
      @@ -2320,13 +2390,13 @@

      Parameters:
      - + + @@ -2379,7 +2449,7 @@
      Parameters:
      @@ -2406,101 +2476,31 @@
      Parameters:
      +
      Returns:
      - - - - - - - - - -

      start()

      - - - - - - -
      - Start the wallet, including listening for transactions. +
      + Instance of the wallet.
      +
      +
      + Type +
      +
      + Wallet - - - - - - - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Source:
      -
      -
      - - - - - - -
      - - - - - - - - - - - - - @@ -2521,44 +2521,32 @@

      Home

      Classes

      • Actor
      • -
      • Aggregator
      • -
      • App
      • Bitcoin
      • +
      • CLI
      • Chain
      • Channel
      • Circuit
      • -
      • CLI
      • Collection
      • -
      • Compiler
      • -
      • Consensus
      • -
      • Entity
      • Environment
      • -
      • Exchange
      • Fabric
      • Federation
      • Filesystem
      • -
      • Hash256
      • HKDF
      • HTTPServer
      • +
      • Hash256
      • Identity
      • Interface
      • Key
      • -
      • Keystore
      • Ledger
      • Lightning
      • Logger
      • Machine
      • -
      • Mempool
      • Message
      • -
      • Node
      • -
      • Oracle
      • -
      • Path
      • Peer
      • Reader
      • Redis
      • Remote
      • Resource
      • -
      • Router
      • Scribe
      • Script
      • Service
      • @@ -2569,9 +2557,8 @@

        Classes

      • Stash
      • State
      • Store
      • -
      • Swap
      • Swarm
      • -
      • Transition
      • +
      • Token
      • Tree
      • Value
      • Vector
      • diff --git a/docs/Worker.html b/docs/Worker.html index 74c1093c1..325d47c36 100644 --- a/docs/Worker.html +++ b/docs/Worker.html @@ -384,44 +384,32 @@

        Home

        Classes

        • Actor
        • -
        • Aggregator
        • -
        • App
        • Bitcoin
        • +
        • CLI
        • Chain
        • Channel
        • Circuit
        • -
        • CLI
        • Collection
        • -
        • Compiler
        • -
        • Consensus
        • -
        • Entity
        • Environment
        • -
        • Exchange
        • Fabric
        • Federation
        • Filesystem
        • -
        • Hash256
        • HKDF
        • HTTPServer
        • +
        • Hash256
        • Identity
        • Interface
        • Key
        • -
        • Keystore
        • Ledger
        • Lightning
        • Logger
        • Machine
        • -
        • Mempool
        • Message
        • -
        • Node
        • -
        • Oracle
        • -
        • Path
        • Peer
        • Reader
        • Redis
        • Remote
        • Resource
        • -
        • Router
        • Scribe
        • Script
        • Service
        • @@ -432,9 +420,8 @@

          Classes

        • Stash
        • State
        • Store
        • -
        • Swap
        • Swarm
        • -
        • Transition
        • +
        • Token
        • Tree
        • Value
        • Vector
        • diff --git a/docs/ZMQ.html b/docs/ZMQ.html index f95ee6ade..0e9be5461 100644 --- a/docs/ZMQ.html +++ b/docs/ZMQ.html @@ -579,44 +579,32 @@

          Home

          Classes

          • Actor
          • -
          • Aggregator
          • -
          • App
          • Bitcoin
          • +
          • CLI
          • Chain
          • Channel
          • Circuit
          • -
          • CLI
          • Collection
          • -
          • Compiler
          • -
          • Consensus
          • -
          • Entity
          • Environment
          • -
          • Exchange
          • Fabric
          • Federation
          • Filesystem
          • -
          • Hash256
          • HKDF
          • HTTPServer
          • +
          • Hash256
          • Identity
          • Interface
          • Key
          • -
          • Keystore
          • Ledger
          • Lightning
          • Logger
          • Machine
          • -
          • Mempool
          • Message
          • -
          • Node
          • -
          • Oracle
          • -
          • Path
          • Peer
          • Reader
          • Redis
          • Remote
          • Resource
          • -
          • Router
          • Scribe
          • Script
          • Service
          • @@ -627,9 +615,8 @@

            Classes

          • Stash
          • State
          • Store
          • -
          • Swap
          • Swarm
          • -
          • Transition
          • +
          • Token
          • Tree
          • Value
          • Vector
          • diff --git a/docs/docco.css b/docs/docco.css new file mode 100644 index 000000000..c3d580fab --- /dev/null +++ b/docs/docco.css @@ -0,0 +1,518 @@ +/*--------------------- Typography ----------------------------*/ + +@font-face { + font-family: 'aller-light'; + src: url('public/fonts/aller-light.eot'); + src: url('public/fonts/aller-light.eot?#iefix') format('embedded-opentype'), + url('public/fonts/aller-light.woff') format('woff'), + url('public/fonts/aller-light.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'aller-bold'; + src: url('public/fonts/aller-bold.eot'); + src: url('public/fonts/aller-bold.eot?#iefix') format('embedded-opentype'), + url('public/fonts/aller-bold.woff') format('woff'), + url('public/fonts/aller-bold.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'roboto-black'; + src: url('public/fonts/roboto-black.eot'); + src: url('public/fonts/roboto-black.eot?#iefix') format('embedded-opentype'), + url('public/fonts/roboto-black.woff') format('woff'), + url('public/fonts/roboto-black.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +/*--------------------- Layout ----------------------------*/ +html { height: 100%; } +body { + font-family: "aller-light"; + font-size: 14px; + line-height: 18px; + color: #30404f; + margin: 0; padding: 0; + height:100%; +} +#container { min-height: 100%; } + +a { + color: #000; +} + +b, strong { + font-weight: normal; + font-family: "aller-bold"; +} + +p { + margin: 15px 0 0px; +} + .annotation ul, .annotation ol { + margin: 25px 0; + } + .annotation ul li, .annotation ol li { + font-size: 14px; + line-height: 18px; + margin: 10px 0; + } + +h1, h2, h3, h4, h5, h6 { + color: #112233; + line-height: 1em; + font-weight: normal; + font-family: "roboto-black"; + text-transform: uppercase; + margin: 30px 0 15px 0; +} + +h1 { + margin-top: 40px; +} +h2 { + font-size: 1.26em; +} + +hr { + border: 0; + background: 1px #ddd; + height: 1px; + margin: 20px 0; +} + +pre, tt, code { + font-size: 12px; line-height: 16px; + font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; + margin: 0; padding: 0; +} + .annotation pre { + display: block; + margin: 0; + padding: 7px 10px; + background: #fcfcfc; + -moz-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + -webkit-box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + box-shadow: inset 0 0 10px rgba(0,0,0,0.1); + overflow-x: auto; + } + .annotation pre code { + border: 0; + padding: 0; + background: transparent; + } + + +blockquote { + border-left: 5px solid #ccc; + margin: 0; + padding: 1px 0 1px 1em; +} + .sections blockquote p { + font-family: Menlo, Consolas, Monaco, monospace; + font-size: 12px; line-height: 16px; + color: #999; + margin: 10px 0 0; + white-space: pre-wrap; + } + +ul.sections { + list-style: none; + padding:0 0 5px 0;; + margin:0; +} + +/* + Force border-box so that % widths fit the parent + container without overlap because of margin/padding. + + More Info : http://www.quirksmode.org/css/box.html +*/ +ul.sections > li > div { + -moz-box-sizing: border-box; /* firefox */ + -ms-box-sizing: border-box; /* ie */ + -webkit-box-sizing: border-box; /* webkit */ + -khtml-box-sizing: border-box; /* konqueror */ + box-sizing: border-box; /* css3 */ +} + + +/*---------------------- Jump Page -----------------------------*/ +#jump_to, #jump_page { + margin: 0; + background: white; + -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; + -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; + font: 16px Arial; + cursor: pointer; + text-align: right; + list-style: none; +} + +#jump_to a { + text-decoration: none; +} + +#jump_to a.large { + display: none; +} +#jump_to a.small { + font-size: 22px; + font-weight: bold; + color: #676767; +} + +#jump_to, #jump_wrapper { + position: fixed; + right: 0; top: 0; + padding: 10px 15px; + margin:0; +} + +#jump_wrapper { + display: none; + padding:0; +} + +#jump_to:hover #jump_wrapper { + display: block; +} + +#jump_page_wrapper{ + position: fixed; + right: 0; + top: 0; + bottom: 0; +} + +#jump_page { + padding: 5px 0 3px; + margin: 0 0 25px 25px; + max-height: 100%; + overflow: auto; +} + +#jump_page .source { + display: block; + padding: 15px; + text-decoration: none; + border-top: 1px solid #eee; +} + +#jump_page .source:hover { + background: #f5f5ff; +} + +#jump_page .source:first-child { +} + +/*---------------------- Low resolutions (> 320px) ---------------------*/ +@media only screen and (min-width: 320px) { + .sswrap { display: none; } + + ul.sections > li > div { + display: block; + padding:5px 10px 0 10px; + } + + ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { + padding-left: 30px; + } + + ul.sections > li > div.content { + overflow-x:auto; + -webkit-box-shadow: inset 0 0 5px #e5e5ee; + box-shadow: inset 0 0 5px #e5e5ee; + border: 1px solid #dedede; + margin:5px 10px 5px 10px; + padding-bottom: 5px; + } + + ul.sections > li > div.annotation pre { + margin: 7px 0 7px; + padding-left: 15px; + } + + ul.sections > li > div.annotation p tt, .annotation code { + background: #f8f8ff; + border: 1px solid #dedede; + font-size: 12px; + padding: 0 0.2em; + } +} + +/*---------------------- (> 481px) ---------------------*/ +@media only screen and (min-width: 481px) { + #container { + position: relative; + } + body { + background-color: #F5F5FF; + font-size: 15px; + line-height: 21px; + } + pre, tt, code { + line-height: 18px; + } + p, ul, ol { + margin: 0 0 15px; + } + + + #jump_to { + padding: 5px 10px; + } + #jump_wrapper { + padding: 0; + } + #jump_to, #jump_page { + font: 10px Arial; + text-transform: uppercase; + } + #jump_page .source { + padding: 5px 10px; + } + #jump_to a.large { + display: inline-block; + } + #jump_to a.small { + display: none; + } + + + + #background { + position: absolute; + top: 0; bottom: 0; + width: 350px; + background: #fff; + border-right: 1px solid #e5e5ee; + z-index: -1; + } + + ul.sections > li > div.annotation ul, ul.sections > li > div.annotation ol { + padding-left: 40px; + } + + ul.sections > li { + white-space: nowrap; + } + + ul.sections > li > div { + display: inline-block; + } + + ul.sections > li > div.annotation { + max-width: 350px; + min-width: 350px; + min-height: 5px; + padding: 13px; + overflow-x: hidden; + white-space: normal; + vertical-align: top; + text-align: left; + } + ul.sections > li > div.annotation pre { + margin: 15px 0 15px; + padding-left: 15px; + } + + ul.sections > li > div.content { + padding: 13px; + vertical-align: top; + border: none; + -webkit-box-shadow: none; + box-shadow: none; + } + + .sswrap { + position: relative; + display: inline; + } + + .ss { + font: 12px Arial; + text-decoration: none; + color: #454545; + position: absolute; + top: 3px; left: -20px; + padding: 1px 2px; + opacity: 0; + -webkit-transition: opacity 0.2s linear; + } + .for-h1 .ss { + top: 47px; + } + .for-h2 .ss, .for-h3 .ss, .for-h4 .ss { + top: 35px; + } + + ul.sections > li > div.annotation:hover .ss { + opacity: 1; + } +} + +/*---------------------- (> 1025px) ---------------------*/ +@media only screen and (min-width: 1025px) { + + body { + font-size: 16px; + line-height: 24px; + } + + #background { + width: 525px; + } + ul.sections > li > div.annotation { + max-width: 525px; + min-width: 525px; + padding: 10px 25px 1px 50px; + } + ul.sections > li > div.content { + padding: 9px 15px 16px 25px; + } +} + +/*---------------------- Syntax Highlighting -----------------------------*/ + +td.linenos { background-color: #f0f0f0; padding-right: 10px; } +span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } +/* + +github.com style (c) Vasily Polovnyov + +*/ + +pre code { + display: block; padding: 0.5em; + color: #000; + background: #f8f8ff +} + +pre .hljs-comment, +pre .hljs-template_comment, +pre .hljs-diff .hljs-header, +pre .hljs-javadoc { + color: #408080; + font-style: italic +} + +pre .hljs-keyword, +pre .hljs-assignment, +pre .hljs-literal, +pre .hljs-css .hljs-rule .hljs-keyword, +pre .hljs-winutils, +pre .hljs-javascript .hljs-title, +pre .hljs-lisp .hljs-title, +pre .hljs-subst { + color: #954121; + /*font-weight: bold*/ +} + +pre .hljs-number, +pre .hljs-hexcolor { + color: #40a070 +} + +pre .hljs-string, +pre .hljs-tag .hljs-value, +pre .hljs-phpdoc, +pre .hljs-tex .hljs-formula { + color: #219161; +} + +pre .hljs-title, +pre .hljs-id { + color: #19469D; +} +pre .hljs-params { + color: #00F; +} + +pre .hljs-javascript .hljs-title, +pre .hljs-lisp .hljs-title, +pre .hljs-subst { + font-weight: normal +} + +pre .hljs-class .hljs-title, +pre .hljs-haskell .hljs-label, +pre .hljs-tex .hljs-command { + color: #458; + font-weight: bold +} + +pre .hljs-tag, +pre .hljs-tag .hljs-title, +pre .hljs-rules .hljs-property, +pre .hljs-django .hljs-tag .hljs-keyword { + color: #000080; + font-weight: normal +} + +pre .hljs-attribute, +pre .hljs-variable, +pre .hljs-instancevar, +pre .hljs-lisp .hljs-body { + color: #008080 +} + +pre .hljs-regexp { + color: #B68 +} + +pre .hljs-class { + color: #458; + font-weight: bold +} + +pre .hljs-symbol, +pre .hljs-ruby .hljs-symbol .hljs-string, +pre .hljs-ruby .hljs-symbol .hljs-keyword, +pre .hljs-ruby .hljs-symbol .hljs-keymethods, +pre .hljs-lisp .hljs-keyword, +pre .hljs-tex .hljs-special, +pre .hljs-input_number { + color: #990073 +} + +pre .hljs-builtin, +pre .hljs-constructor, +pre .hljs-built_in, +pre .hljs-lisp .hljs-title { + color: #0086b3 +} + +pre .hljs-preprocessor, +pre .hljs-pi, +pre .hljs-doctype, +pre .hljs-shebang, +pre .hljs-cdata { + color: #999; + font-weight: bold +} + +pre .hljs-deletion { + background: #fdd +} + +pre .hljs-addition { + background: #dfd +} + +pre .hljs-diff .hljs-change { + background: #0086b3 +} + +pre .hljs-chunk { + color: #aaa +} + +pre .hljs-tex .hljs-formula { + opacity: 0.5; +} diff --git a/docs/index.html b/docs/index.html index 93fdae428..06170c1dd 100644 --- a/docs/index.html +++ b/docs/index.html @@ -55,7 +55,7 @@

            Fabric Developer Resources

            Quick Start

            See also QUICKSTART.md for up-to-date instructions.

              -
            1. nvm use 16.17.1 (you can get nvm from nvm.sh)
            2. +
            3. nvm use 18.19.1 (you can get nvm from nvm.sh)
            4. npm install -g @fabric/core to add fabric to your path
            5. (optional) fabric setup to set up your environment (generates a new master key)
            6. fabric should now be enough to get you up and running!
            7. @@ -63,6 +63,10 @@

              Quick Start

              That's it! Let's take a look at overall Fabric system and how you, as a developer, might interact with it.

              Architecture

              Fabric is two things — a protocol for machines to exchange information ("the Fabric Protocol"), and a sotware library (@fabric/core) offering up many tools and utilities for building your own networks which speak this protocol.

              +

              Typically, you will need the following:

              +
                +
              • a Bitcoin Node (bitcoind and/or bcoin with bcoin --only=127.0.0.1)
              • +

              Overview

              Using Fabric to interface securely with decentralized systems, you'll start by following the instructions above to obtain a globally-available version of the fabric command-line client, which provides the majority of tools you'll need along the way.

              The @fabric/core library consists of a few key components:

              @@ -246,44 +250,32 @@

              Home

              Classes

              • Actor
              • -
              • Aggregator
              • -
              • App
              • Bitcoin
              • +
              • CLI
              • Chain
              • Channel
              • Circuit
              • -
              • CLI
              • Collection
              • -
              • Compiler
              • -
              • Consensus
              • -
              • Entity
              • Environment
              • -
              • Exchange
              • Fabric
              • Federation
              • Filesystem
              • -
              • Hash256
              • HKDF
              • HTTPServer
              • +
              • Hash256
              • Identity
              • Interface
              • Key
              • -
              • Keystore
              • Ledger
              • Lightning
              • Logger
              • Machine
              • -
              • Mempool
              • Message
              • -
              • Node
              • -
              • Oracle
              • -
              • Path
              • Peer
              • Reader
              • Redis
              • Remote
              • Resource
              • -
              • Router
              • Scribe
              • Script
              • Service
              • @@ -294,9 +286,8 @@

                Classes

              • Stash
              • State
              • Store
              • -
              • Swap
              • Swarm
              • -
              • Transition
              • +
              • Token
              • Tree
              • Value
              • Vector
              • diff --git a/docs/public/fonts/aller-bold.eot b/docs/public/fonts/aller-bold.eot new file mode 100644 index 000000000..1b32532a8 Binary files /dev/null and b/docs/public/fonts/aller-bold.eot differ diff --git a/docs/public/fonts/aller-bold.ttf b/docs/public/fonts/aller-bold.ttf new file mode 100644 index 000000000..dc4cc9c27 Binary files /dev/null and b/docs/public/fonts/aller-bold.ttf differ diff --git a/docs/public/fonts/aller-bold.woff b/docs/public/fonts/aller-bold.woff new file mode 100644 index 000000000..fa16fd0ab Binary files /dev/null and b/docs/public/fonts/aller-bold.woff differ diff --git a/docs/public/fonts/aller-light.eot b/docs/public/fonts/aller-light.eot new file mode 100644 index 000000000..40bd654b5 Binary files /dev/null and b/docs/public/fonts/aller-light.eot differ diff --git a/docs/public/fonts/aller-light.ttf b/docs/public/fonts/aller-light.ttf new file mode 100644 index 000000000..c2c72902a Binary files /dev/null and b/docs/public/fonts/aller-light.ttf differ diff --git a/docs/public/fonts/aller-light.woff b/docs/public/fonts/aller-light.woff new file mode 100644 index 000000000..81a09d18e Binary files /dev/null and b/docs/public/fonts/aller-light.woff differ diff --git a/docs/public/fonts/roboto-black.eot b/docs/public/fonts/roboto-black.eot new file mode 100644 index 000000000..571ed4912 Binary files /dev/null and b/docs/public/fonts/roboto-black.eot differ diff --git a/docs/public/fonts/roboto-black.ttf b/docs/public/fonts/roboto-black.ttf new file mode 100644 index 000000000..e0300b3ee Binary files /dev/null and b/docs/public/fonts/roboto-black.ttf differ diff --git a/docs/public/fonts/roboto-black.woff b/docs/public/fonts/roboto-black.woff new file mode 100644 index 000000000..642e5b60f Binary files /dev/null and b/docs/public/fonts/roboto-black.woff differ diff --git a/docs/public/stylesheets/normalize.css b/docs/public/stylesheets/normalize.css new file mode 100644 index 000000000..73abb76fa --- /dev/null +++ b/docs/public/stylesheets/normalize.css @@ -0,0 +1,375 @@ +/*! normalize.css v2.0.1 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE 8/9. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Sets default font family to sans-serif. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Removes default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses `h1` font sizes within `section` and `article` in Firefox 4+, + * Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; +} + +/* + * Addresses styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/* + * Addresses styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + + +/* + * Corrects font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Sets consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/* + * Addresses inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * Removes border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/* + * Corrects overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/* + * 1. Corrects font family not being inherited in all browsers. + * 2. Corrects font size not being inherited in all browsers. + * 3. Addresses margins set differently in Firefox 4+, Safari 5, and Chrome + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/* + * Addresses Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to `content-box` in IE 8/9. + * 2. Removes excess padding in IE 8/9. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE 8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/docs/services_bitcoin.js.html b/docs/services_bitcoin.js.html index e2262a9d4..79d83fb46 100644 --- a/docs/services_bitcoin.js.html +++ b/docs/services_bitcoin.js.html @@ -34,7 +34,8 @@

                Source: services/bitcoin.js

                'use strict';
                 
                 const {
                -  BITCOIN_GENESIS
                +  BITCOIN_GENESIS,
                +  FABRIC_USER_AGENT
                 } = require('../constants');
                 
                 const OP_TRACE = require('../contracts/trace');
                @@ -155,12 +156,12 @@ 

                Source: services/bitcoin.js

                } }); - // Runs fullnode from bcoin - if (this.settings.fullnode) { + // Runs fullnode from bcoin (disabled for now) + /* if (this.settings.fullnode) { this.fullnode = new FullNode({ network: this.settings.network }); - } + } */ // Local Bitcoin Node this.peer = null; /* bcoin.Peer.fromOptions({ @@ -230,24 +231,6 @@

                Source: services/bitcoin.js

                return this; } - /** - * Provides bcoin's implementation of `TX` internally. This static may be - * removed in the future. - * @deprecated - */ - static get Transaction () { - return bcoin.TX; - } - - /** - * Provides bcoin's implementation of `MTX` internally. This static may be - * removed in the future. - * @deprecated - */ - static get MutableTransaction () { - return bcoin.TX; - } - get balance () { return this._state.balances.mine.trusted; } @@ -260,18 +243,14 @@

                Source: services/bitcoin.js

                * User Agent string for the Bitcoin P2P network. */ get UAString () { - return 'Fabric/Bitcoin 0.1.0-dev (@fabric/core#v0.1.0-RC1)'; + return FABRIC_USER_AGENT; } /** * Chain tip (block hash of the chain with the most Proof of Work) */ get tip () { - if (this.settings.fullnode) { - return this.fullnode.chain.tip.hash.toString('hex'); - } else { - return (this.chain && this.chain.tip) ? this.chain.tip.toString('hex') : null; - } + return (this.chain && this.chain.tip) ? this.chain.tip.toString('hex') : null; } /** @@ -399,8 +378,8 @@

                Source: services/bitcoin.js

                state: self.state }; - self.emit('beat', beat); - self.commit(); + // self.emit('beat', beat); + // self.commit(); }); return this; @@ -970,7 +949,7 @@

                Source: services/bitcoin.js

                if (this.settings.verbosity >= 4) console.log('[SERVICES:BITCOIN]', `Starting fullnode for network "${this.settings.network}"...`); - for (const candidate of this.settings.seeds) { + /* for (const candidate of this.settings.seeds) { let parts = candidate.split(':'); let addr = new NetAddress({ host: parts[0], @@ -979,7 +958,7 @@

                Source: services/bitcoin.js

                let peer = this.fullnode.pool.createOutbound(addr); this.fullnode.pool.peers.add(peer); - } + } */ await this.fullnode.open(); await this.fullnode.connect(); @@ -1036,8 +1015,13 @@

                Source: services/bitcoin.js

                } async getUnusedAddress () { - const address = await this._makeRPCRequest('getnewaddress'); - return address; + if (this.rpc) { + const address = await this._makeRPCRequest('getnewaddress'); + return address; + } else { + const target = this.key.deriveAddress(this.state.index); + return target.address; + } } async append (raw) { @@ -1473,6 +1457,9 @@

                Source: services/bitcoin.js

                * @returns {PSBT} Instance of the PSBT. */ async _buildPSBT (options = {}) { + if (!options.inputs) options.inputs = []; + if (!options.outputs) options.outputs = []; + const psbt = new bitcoin.Psbt({ network: this.networks[this.settings.network] }); @@ -1750,7 +1737,7 @@

                Source: services/bitcoin.js

                this.emit('log', `Beginning chain sync for height ${this.height} with best block: ${this.best}`); await this._syncBestBlock(); - await this._syncChainHeadersOverRPC(this.best); + // await this._syncChainHeadersOverRPC(this.best); // await this._syncRawChainOverRPC(); this.state.status = 'READY'; @@ -1790,7 +1777,7 @@

                Source: services/bitcoin.js

                }); if (this.store) await this.store.open(); - if (this.settings.fullnode) { + /* if (this.settings.fullnode) { this.fullnode.on('peer connect', function peerConnectHandler (peer) { self.emit('warning', `[SERVICES:BITCOIN]', 'Peer connected to Full Node: ${peer}`); }); @@ -1801,7 +1788,7 @@

                Source: services/bitcoin.js

                this.fullnode.on('tx', async function fullnodeTxHandler (tx) { self.emit('log', `tx event: ${JSON.stringify(tx)}`); }); - } + } */ this.wallet.on('message', function (msg) { self.emit('log', `wallet msg: ${msg}`); @@ -1832,7 +1819,7 @@

                Source: services/bitcoin.js

                // await this.chain.start(); // Start nodes - if (this.settings.fullnode) await this._startLocalNode(); + // if (this.settings.fullnode) await this._startLocalNode(); if (this.settings.zmq) await this._startZMQ(); // Handle RPC mode @@ -1868,7 +1855,7 @@

                Source: services/bitcoin.js

                const wallet = await this._loadWallet(); // Heartbeat - self._heart = setInterval(self.tick.bind(self), self.settings.interval); + // self._heart = setInterval(self.tick.bind(self), self.settings.interval); // Sync! await self._syncWithRPC(); @@ -1899,7 +1886,7 @@

                Source: services/bitcoin.js

                */ async stop () { if (this.peer && this.peer.connected) await this.peer.destroy(); - if (this.fullnode) await this.fullnode.close(); + // if (this.fullnode) await this.fullnode.close(); await this.wallet.stop(); // await this.chain.stop(); @@ -1925,44 +1912,32 @@

                Home

                Classes

                • Actor
                • -
                • Aggregator
                • -
                • App
                • Bitcoin
                • +
                • CLI
                • Chain
                • Channel
                • Circuit
                • -
                • CLI
                • Collection
                • -
                • Compiler
                • -
                • Consensus
                • -
                • Entity
                • Environment
                • -
                • Exchange
                • Fabric
                • Federation
                • Filesystem
                • -
                • Hash256
                • HKDF
                • HTTPServer
                • +
                • Hash256
                • Identity
                • Interface
                • Key
                • -
                • Keystore
                • Ledger
                • Lightning
                • Logger
                • Machine
                • -
                • Mempool
                • Message
                • -
                • Node
                • -
                • Oracle
                • -
                • Path
                • Peer
                • Reader
                • Redis
                • Remote
                • Resource
                • -
                • Router
                • Scribe
                • Script
                • Service
                • @@ -1973,9 +1948,8 @@

                  Classes

                • Stash
                • State
                • Store
                • -
                • Swap
                • Swarm
                • -
                • Transition
                • +
                • Token
                • Tree
                • Value
                • Vector
                • diff --git a/docs/services_lightning.js.html b/docs/services_lightning.js.html index e4f979080..3f8e6aee8 100644 --- a/docs/services_lightning.js.html +++ b/docs/services_lightning.js.html @@ -76,7 +76,12 @@

                  Source: services/lightning.js

                  this._state = { content: { actors: {}, - balances: {}, + balances: { + spendable: 0, + total: 0, + confirmed: 0, + unconfirmed: 0 + }, channels: {}, blockheight: null, node: { @@ -129,6 +134,8 @@

                  Source: services/lightning.js

                  } async start () { + const self = this; + this.status = 'starting'; await this.machine.start(); @@ -176,7 +183,12 @@

                  Source: services/lightning.js

                  } async listFunds () { - return this._makeRPCRequest('listfunds'); + try { + const result = this._makeRPCRequest('listfunds'); + return result; + } catch (exception) { + + } } async _heartbeat () { @@ -285,6 +297,8 @@

                  Source: services/lightning.js

                  if (this.settings.mode === 'rest') { const result = await this.rest._GET('/v1/channel/getInfo'); + // this.emit('debug', `syncing oracle info: ${JSON.stringify(result)}`); + if (result && result.id) { this._state.id = result.id; this._state.name = result.alias; @@ -302,6 +316,7 @@

                  Source: services/lightning.js

                  if (this.settings.mode === 'rest') { const result = await this.rest._GET('/v1/channel/localRemoteBal'); if (result) { + this.emit('debug', `Oracle Balance Result: ${JSON.stringify(result, null, '')}`); this._state.content.balances.spendable = result.totalBalance; this._state.content.balances.confirmed = result.confBalance; this._state.content.balances.unconfirmed = result.unconfBalance; @@ -315,6 +330,9 @@

                  Source: services/lightning.js

                  async _syncOracleChannels () { if (this.settings.mode === 'rest') { const result = await this.rest._GET('/v1/channel/listChannels'); + + // this.emit('debug', `Oracle Channel Result: ${JSON.stringify(result, null, '')}`); + if (!result || !result.map) return this.state; this._state.content.channels = result.map((x) => { return new Actor(x); @@ -323,6 +341,8 @@

                  Source: services/lightning.js

                  return obj; }, {}); + // this.emit('debug', `State: ${JSON.stringify(this.state, null, '')}`); + this.commit(); } @@ -357,6 +377,7 @@

                  Source: services/lightning.js

                  async _syncInfo () { try { const result = await this._makeRPCRequest('getinfo'); + this.emit('log', `Lighting Info: ${JSON.stringify(result, null, ' ')}`); this._state.content.node.id = result.id; this._state.content.node.alias = result.alias; this._state.content.node.color = result.color; @@ -370,11 +391,20 @@

                  Source: services/lightning.js

                  } async _sync () { - await this._syncChannels(); - await this._syncInfo(); + try { + // await this._syncChannels(); + // await this._syncInfo(); + } catch (exception) { + + } + this.emit('sync', this.state); return this; } + + async sync () { + + } } module.exports = Lightning; @@ -390,44 +420,32 @@

                  Home

                  Classes

                  • Actor
                  • -
                  • Aggregator
                  • -
                  • App
                  • Bitcoin
                  • +
                  • CLI
                  • Chain
                  • Channel
                  • Circuit
                  • -
                  • CLI
                  • Collection
                  • -
                  • Compiler
                  • -
                  • Consensus
                  • -
                  • Entity
                  • Environment
                  • -
                  • Exchange
                  • Fabric
                  • Federation
                  • Filesystem
                  • -
                  • Hash256
                  • HKDF
                  • HTTPServer
                  • +
                  • Hash256
                  • Identity
                  • Interface
                  • Key
                  • -
                  • Keystore
                  • Ledger
                  • Lightning
                  • Logger
                  • Machine
                  • -
                  • Mempool
                  • Message
                  • -
                  • Node
                  • -
                  • Oracle
                  • -
                  • Path
                  • Peer
                  • Reader
                  • Redis
                  • Remote
                  • Resource
                  • -
                  • Router
                  • Scribe
                  • Script
                  • Service
                  • @@ -438,9 +456,8 @@

                    Classes

                  • Stash
                  • State
                  • Store
                  • -
                  • Swap
                  • Swarm
                  • -
                  • Transition
                  • +
                  • Token
                  • Tree
                  • Value
                  • Vector
                  • diff --git a/docs/services_redis.js.html b/docs/services_redis.js.html index 1866a85aa..7ad39cb63 100644 --- a/docs/services_redis.js.html +++ b/docs/services_redis.js.html @@ -38,14 +38,14 @@

                    Source: services/redis.js

                    const Message = require('../types/message'); /** - * Connect and subscribe to ZeroMQ servers. + * Connect and subscribe to Redis servers. */ class Redis extends Service { /** - * Creates an instance of a ZeroMQ subscriber. + * Creates an instance of a Redis subscriber. * @param {Object} [settings] Settings for the Redis connection. * @param {String} [settings.host] Host for the Redis server. - * @param {Number} [settings.port] Remote ZeroMQ service port. + * @param {Number} [settings.port] Remote Redis service port. * @returns {Redis} Instance of the Redis service, ready to run `start()` */ constructor (settings = {}) { @@ -128,44 +128,32 @@

                    Home

                    Classes

                    • Actor
                    • -
                    • Aggregator
                    • -
                    • App
                    • Bitcoin
                    • +
                    • CLI
                    • Chain
                    • Channel
                    • Circuit
                    • -
                    • CLI
                    • Collection
                    • -
                    • Compiler
                    • -
                    • Consensus
                    • -
                    • Entity
                    • Environment
                    • -
                    • Exchange
                    • Fabric
                    • Federation
                    • Filesystem
                    • -
                    • Hash256
                    • HKDF
                    • HTTPServer
                    • +
                    • Hash256
                    • Identity
                    • Interface
                    • Key
                    • -
                    • Keystore
                    • Ledger
                    • Lightning
                    • Logger
                    • Machine
                    • -
                    • Mempool
                    • Message
                    • -
                    • Node
                    • -
                    • Oracle
                    • -
                    • Path
                    • Peer
                    • Reader
                    • Redis
                    • Remote
                    • Resource
                    • -
                    • Router
                    • Scribe
                    • Script
                    • Service
                    • @@ -176,9 +164,8 @@

                      Classes

                    • Stash
                    • State
                    • Store
                    • -
                    • Swap
                    • Swarm
                    • -
                    • Transition
                    • +
                    • Token
                    • Tree
                    • Value
                    • Vector
                    • diff --git a/docs/services_zmq.js.html b/docs/services_zmq.js.html index 39e76c05e..9042b2354 100644 --- a/docs/services_zmq.js.html +++ b/docs/services_zmq.js.html @@ -34,7 +34,7 @@

                      Source: services/zmq.js

                      'use strict';
                       
                       // Dependencies
                      -const zeromq = require('zeromq');
                      +const zeromq = require('zeromq/v5-compat');
                       
                       // Fabric Types
                       const Service = require('../types/service');
                      @@ -130,44 +130,32 @@ 

                      Home

                      Classes

                      • Actor
                      • -
                      • Aggregator
                      • -
                      • App
                      • Bitcoin
                      • +
                      • CLI
                      • Chain
                      • Channel
                      • Circuit
                      • -
                      • CLI
                      • Collection
                      • -
                      • Compiler
                      • -
                      • Consensus
                      • -
                      • Entity
                      • Environment
                      • -
                      • Exchange
                      • Fabric
                      • Federation
                      • Filesystem
                      • -
                      • Hash256
                      • HKDF
                      • HTTPServer
                      • +
                      • Hash256
                      • Identity
                      • Interface
                      • Key
                      • -
                      • Keystore
                      • Ledger
                      • Lightning
                      • Logger
                      • Machine
                      • -
                      • Mempool
                      • Message
                      • -
                      • Node
                      • -
                      • Oracle
                      • -
                      • Path
                      • Peer
                      • Reader
                      • Redis
                      • Remote
                      • Resource
                      • -
                      • Router
                      • Scribe
                      • Script
                      • Service
                      • @@ -178,9 +166,8 @@

                        Classes

                      • Stash
                      • State
                      • Store
                      • -
                      • Swap
                      • Swarm
                      • -
                      • Transition
                      • +
                      • Token
                      • Tree
                      • Value
                      • Vector
                      • diff --git a/docs/settings_deprecations.js.html b/docs/settings_deprecations.js.html index 86dae4d97..6cad3f5a2 100644 --- a/docs/settings_deprecations.js.html +++ b/docs/settings_deprecations.js.html @@ -72,44 +72,32 @@

                        Home

                        Classes

                        • Actor
                        • -
                        • Aggregator
                        • -
                        • App
                        • Bitcoin
                        • +
                        • CLI
                        • Chain
                        • Channel
                        • Circuit
                        • -
                        • CLI
                        • Collection
                        • -
                        • Compiler
                        • -
                        • Consensus
                        • -
                        • Entity
                        • Environment
                        • -
                        • Exchange
                        • Fabric
                        • Federation
                        • Filesystem
                        • -
                        • Hash256
                        • HKDF
                        • HTTPServer
                        • +
                        • Hash256
                        • Identity
                        • Interface
                        • Key
                        • -
                        • Keystore
                        • Ledger
                        • Lightning
                        • Logger
                        • Machine
                        • -
                        • Mempool
                        • Message
                        • -
                        • Node
                        • -
                        • Oracle
                        • -
                        • Path
                        • Peer
                        • Reader
                        • Redis
                        • Remote
                        • Resource
                        • -
                        • Router
                        • Scribe
                        • Script
                        • Service
                        • @@ -120,9 +108,8 @@

                          Classes

                        • Stash
                        • State
                        • Store
                        • -
                        • Swap
                        • Swarm
                        • -
                        • Transition
                        • +
                        • Token
                        • Tree
                        • Value
                        • Vector
                        • diff --git a/docs/types_actor.js.html b/docs/types_actor.js.html index 8652037ce..62ea19cea 100644 --- a/docs/types_actor.js.html +++ b/docs/types_actor.js.html @@ -33,10 +33,10 @@

                          Source: types/actor.js

                          'use strict';
                           
                          -// Dependencies
                          -const crypto = require('crypto');
                          -const { EventEmitter } = require('events');
                          +// Generics
                          +const EventEmitter = require('events');
                           
                          +// Dependencies
                           const monitor = require('fast-json-patch');
                           const pointer = require('json-pointer');
                           
                          @@ -154,12 +154,23 @@ 

                          Source: types/actor.js

                          * @returns {Buffer} The random bytes. */ static randomBytes (count = 32) { - return crypto.randomBytes(count); + if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) { + const array = new Uint8Array(count); + window.crypto.getRandomValues(array); + return Buffer.from(array); + } else { + return require('crypto').randomBytes(count); + } } get id () { const buffer = Buffer.from(this.preimage, 'hex'); - return Hash256.digest(buffer); + return Hash256.compute(buffer); + } + + get spendable () { + if (!this.signer) return false; + return false; } get generic () { @@ -167,9 +178,10 @@

                          Source: types/actor.js

                          } get preimage () { + if (!this.generic) throw new Error('Could not get generic'); const string = JSON.stringify(this.generic, null, ' '); const secret = Buffer.from(string, 'utf8'); - const preimage = Hash256.digest(secret); + const preimage = Hash256.compute(secret); return preimage; } @@ -214,6 +226,7 @@

                          Source: types/actor.js

                          * @returns {String} 32-byte ID */ commit () { + const now = new Date(); const state = new Actor(this.state); const changes = monitor.generate(this.observer); const parent = (this.history.length) ? this.history[this.history.length - 1].state : null; @@ -224,7 +237,18 @@

                          Source: types/actor.js

                          }); this.history.push(commit); + this.emit('commit', commit); + this.emit('message', { + type: 'ActorMessage', + data: { + actor: { id: this.id }, + created: now.toISOString(), + object: changes, + type: 'Changes' + } + }); + return commit.id; } @@ -298,10 +322,25 @@

                          Source: types/actor.js

                          } /** - * Casts the Actor to a generic message. + * Casts the Actor to a generic message, used to uniquely identify the Actor's state. + * Fields: + * - `preimage`: JSON.stringify(state) + * - `hash`: SHA256(preimage) + * - `type`: 'FabricActorState' + * - `version`: 1 (for now) + * - `object`: state + * - `parent`: null (for now) + * @see {@link https://en.wikipedia.org/wiki/Merkle_tree} + * @see {@link https://dev.fabric.pub/messages} * @returns {Object} Generic message object. */ - toGenericMessage () { + toGenericMessage (type = 'FabricActorState') { + const object = this.toObject(); // Fabric Object Representation (FOR) + const input = JSON.stringify(object); // uses clean, default JSON stringify + const buffer = Buffer.from(input, 'utf8'); + // const hash = Hash256.digest(buffer).toString('hex'); + // const version = 1; + return { type: 'FabricActorState', object: this.toObject() @@ -345,7 +384,7 @@

                          Source: types/actor.js

                          } randomBytes (count = 32) { - return crypto.randomBytes(count); + return Actor.randomBytes(count); } /** @@ -393,6 +432,12 @@

                          Source: types/actor.js

                          return this; } + validate () { + if (!this.state) return false; + if (!this.id) return false; + return true; + } + /** * Get the inner value of the Actor with an optional cast type. * @param {String} [format] Cast the value to one of: `buffer, hex, json, string` @@ -436,27 +481,23 @@

                          Source: types/actor.js

                          * @returns {Object} Fabric state. */ _readObject (input = {}) { - let state = {}; - if (typeof input === 'string') { - state = Object.assign(state, { + return Object.assign({}, { type: 'String', size: input.length, content: input, encoding: 'utf8' }); } else if (input instanceof Buffer) { - state = Object.assign(state, { + return Object.assign({}, { type: 'Buffer', size: input.length, content: input.toString('hex'), encoding: 'hex' }); } else { - state = Object.assign(state, input); + return Object.assign({}, input); } - - return state; } } @@ -473,44 +514,32 @@

                          Home

                          Classes

                          • Actor
                          • -
                          • Aggregator
                          • -
                          • App
                          • Bitcoin
                          • +
                          • CLI
                          • Chain
                          • Channel
                          • Circuit
                          • -
                          • CLI
                          • Collection
                          • -
                          • Compiler
                          • -
                          • Consensus
                          • -
                          • Entity
                          • Environment
                          • -
                          • Exchange
                          • Fabric
                          • Federation
                          • Filesystem
                          • -
                          • Hash256
                          • HKDF
                          • HTTPServer
                          • +
                          • Hash256
                          • Identity
                          • Interface
                          • Key
                          • -
                          • Keystore
                          • Ledger
                          • Lightning
                          • Logger
                          • Machine
                          • -
                          • Mempool
                          • Message
                          • -
                          • Node
                          • -
                          • Oracle
                          • -
                          • Path
                          • Peer
                          • Reader
                          • Redis
                          • Remote
                          • Resource
                          • -
                          • Router
                          • Scribe
                          • Script
                          • Service
                          • @@ -521,9 +550,8 @@

                            Classes

                          • Stash
                          • State
                          • Store
                          • -
                          • Swap
                          • Swarm
                          • -
                          • Transition
                          • +
                          • Token
                          • Tree
                          • Value
                          • Vector
                          • diff --git a/docs/types_aggregator.js.html b/docs/types_aggregator.js.html index 78920259d..dbc2d6ae7 100644 --- a/docs/types_aggregator.js.html +++ b/docs/types_aggregator.js.html @@ -41,16 +41,7 @@

                            Source: types/aggregator.js

                            const Actor = require('./actor'); const Tree = require('./tree'); -/** - * Aggregates a set of balances (inputs). - */ class Aggregator extends Service { - /** - * Create a new Aggregator. - * @param {Object} [settings] Map of configuration values. - * @param {Array} [settings.inputs] Array of {@link AnchorBalance} instances. - * @returns {Aggregator} Instance of the {@link Aggregator}. - */ constructor (settings = {}) { super(settings); @@ -171,44 +162,32 @@

                            Home

                            Classes

                            • Actor
                            • -
                            • Aggregator
                            • -
                            • App
                            • Bitcoin
                            • +
                            • CLI
                            • Chain
                            • Channel
                            • Circuit
                            • -
                            • CLI
                            • Collection
                            • -
                            • Compiler
                            • -
                            • Consensus
                            • -
                            • Entity
                            • Environment
                            • -
                            • Exchange
                            • Fabric
                            • Federation
                            • Filesystem
                            • -
                            • Hash256
                            • HKDF
                            • HTTPServer
                            • +
                            • Hash256
                            • Identity
                            • Interface
                            • Key
                            • -
                            • Keystore
                            • Ledger
                            • Lightning
                            • Logger
                            • Machine
                            • -
                            • Mempool
                            • Message
                            • -
                            • Node
                            • -
                            • Oracle
                            • -
                            • Path
                            • Peer
                            • Reader
                            • Redis
                            • Remote
                            • Resource
                            • -
                            • Router
                            • Scribe
                            • Script
                            • Service
                            • @@ -219,9 +198,8 @@

                              Classes

                            • Stash
                            • State
                            • Store
                            • -
                            • Swap
                            • Swarm
                            • -
                            • Transition
                            • +
                            • Token
                            • Tree
                            • Value
                            • Vector
                            • diff --git a/docs/types_app.js.html b/docs/types_app.js.html index d3dfe68d1..51343e4a3 100644 --- a/docs/types_app.js.html +++ b/docs/types_app.js.html @@ -48,20 +48,7 @@

                              Source: types/app.js

                              const Storage = require('./store'); // const Swarm = require('./swarm'); -/** - * Web-friendly application framework for building single-page applications with - * Fabric-based networking and storage. - * @extends Service - * @property {Collection} components Interface elements. - * @property {Store} stash Routable {@link Datastore}. - */ -// class App extends Scribe { class App extends Service { - /** - * Generic bundle for building Fabric applications. - * @param {Object} definition Application definition. See `config` for examples. - * @return {App} Returns an instance of `App`. - */ constructor (definition = {}) { super(definition); @@ -428,44 +415,32 @@

                              Home

                              Classes

                              • Actor
                              • -
                              • Aggregator
                              • -
                              • App
                              • Bitcoin
                              • +
                              • CLI
                              • Chain
                              • Channel
                              • Circuit
                              • -
                              • CLI
                              • Collection
                              • -
                              • Compiler
                              • -
                              • Consensus
                              • -
                              • Entity
                              • Environment
                              • -
                              • Exchange
                              • Fabric
                              • Federation
                              • Filesystem
                              • -
                              • Hash256
                              • HKDF
                              • HTTPServer
                              • +
                              • Hash256
                              • Identity
                              • Interface
                              • Key
                              • -
                              • Keystore
                              • Ledger
                              • Lightning
                              • Logger
                              • Machine
                              • -
                              • Mempool
                              • Message
                              • -
                              • Node
                              • -
                              • Oracle
                              • -
                              • Path
                              • Peer
                              • Reader
                              • Redis
                              • Remote
                              • Resource
                              • -
                              • Router
                              • Scribe
                              • Script
                              • Service
                              • @@ -476,9 +451,8 @@

                                Classes

                              • Stash
                              • State
                              • Store
                              • -
                              • Swap
                              • Swarm
                              • -
                              • Transition
                              • +
                              • Token
                              • Tree
                              • Value
                              • Vector
                              • diff --git a/docs/types_chain.js.html b/docs/types_chain.js.html index 0c2a6675b..a98ddbf6b 100644 --- a/docs/types_chain.js.html +++ b/docs/types_chain.js.html @@ -362,44 +362,32 @@

                                Home

                                Classes

                                • Actor
                                • -
                                • Aggregator
                                • -
                                • App
                                • Bitcoin
                                • +
                                • CLI
                                • Chain
                                • Channel
                                • Circuit
                                • -
                                • CLI
                                • Collection
                                • -
                                • Compiler
                                • -
                                • Consensus
                                • -
                                • Entity
                                • Environment
                                • -
                                • Exchange
                                • Fabric
                                • Federation
                                • Filesystem
                                • -
                                • Hash256
                                • HKDF
                                • HTTPServer
                                • +
                                • Hash256
                                • Identity
                                • Interface
                                • Key
                                • -
                                • Keystore
                                • Ledger
                                • Lightning
                                • Logger
                                • Machine
                                • -
                                • Mempool
                                • Message
                                • -
                                • Node
                                • -
                                • Oracle
                                • -
                                • Path
                                • Peer
                                • Reader
                                • Redis
                                • Remote
                                • Resource
                                • -
                                • Router
                                • Scribe
                                • Script
                                • Service
                                • @@ -410,9 +398,8 @@

                                  Classes

                                • Stash
                                • State
                                • Store
                                • -
                                • Swap
                                • Swarm
                                • -
                                • Transition
                                • +
                                • Token
                                • Tree
                                • Value
                                • Vector
                                • diff --git a/docs/types_channel.js.html b/docs/types_channel.js.html index ce8269e4d..23f2b289c 100644 --- a/docs/types_channel.js.html +++ b/docs/types_channel.js.html @@ -44,7 +44,7 @@

                                  Source: types/channel.js

                                  const Secret = require('./secret'); // const Consensus = require('./consensus'); -const Layer = require('./layer'); +// const Layer = require('./layer'); /** * The {@link Channel} is a encrypted connection with a member of your @@ -133,10 +133,10 @@

                                  Source: types/channel.js

                                  */ add (amount) { const value = new BN(amount + ''); - const layer = new Layer({ + /* const layer = new Layer({ parents: [this._parent], uint256: value - }); + }); */ this._state.value.outgoing += amount; this.commit(); @@ -154,7 +154,7 @@

                                  Source: types/channel.js

                                  * @param {Mixed} input Instance of a {@link Transaction}. */ async fund (input) { - this._layer = new Layer({ inputs: [input] }); + // this._layer = new Layer({ inputs: [input] }); this._state.inputs.push(input); this.commit(); } @@ -214,44 +214,32 @@

                                  Home

                                  Classes

                                  • Actor
                                  • -
                                  • Aggregator
                                  • -
                                  • App
                                  • Bitcoin
                                  • +
                                  • CLI
                                  • Chain
                                  • Channel
                                  • Circuit
                                  • -
                                  • CLI
                                  • Collection
                                  • -
                                  • Compiler
                                  • -
                                  • Consensus
                                  • -
                                  • Entity
                                  • Environment
                                  • -
                                  • Exchange
                                  • Fabric
                                  • Federation
                                  • Filesystem
                                  • -
                                  • Hash256
                                  • HKDF
                                  • HTTPServer
                                  • +
                                  • Hash256
                                  • Identity
                                  • Interface
                                  • Key
                                  • -
                                  • Keystore
                                  • Ledger
                                  • Lightning
                                  • Logger
                                  • Machine
                                  • -
                                  • Mempool
                                  • Message
                                  • -
                                  • Node
                                  • -
                                  • Oracle
                                  • -
                                  • Path
                                  • Peer
                                  • Reader
                                  • Redis
                                  • Remote
                                  • Resource
                                  • -
                                  • Router
                                  • Scribe
                                  • Script
                                  • Service
                                  • @@ -262,9 +250,8 @@

                                    Classes

                                  • Stash
                                  • State
                                  • Store
                                  • -
                                  • Swap
                                  • Swarm
                                  • -
                                  • Transition
                                  • +
                                  • Token
                                  • Tree
                                  • Value
                                  • Vector
                                  • diff --git a/docs/types_circuit.js.html b/docs/types_circuit.js.html index 310d1b3dd..6b5543435 100644 --- a/docs/types_circuit.js.html +++ b/docs/types_circuit.js.html @@ -47,7 +47,7 @@

                                    Source: types/circuit.js

                                    * The {@link Circuit} is the mechanism through which {@link Fabric} * operates, a computable directed graph describing a network of * {@link Peer} components and their interactions (side effects). - * See also {@link Swarm} for deeper *inspection of {@link Machine} + * See also {@link Swarm} for deeper inspection of {@link Machine} * mechanics. */ class Circuit extends Actor { @@ -268,44 +268,32 @@

                                    Home

                                    Classes

                                    • Actor
                                    • -
                                    • Aggregator
                                    • -
                                    • App
                                    • Bitcoin
                                    • +
                                    • CLI
                                    • Chain
                                    • Channel
                                    • Circuit
                                    • -
                                    • CLI
                                    • Collection
                                    • -
                                    • Compiler
                                    • -
                                    • Consensus
                                    • -
                                    • Entity
                                    • Environment
                                    • -
                                    • Exchange
                                    • Fabric
                                    • Federation
                                    • Filesystem
                                    • -
                                    • Hash256
                                    • HKDF
                                    • HTTPServer
                                    • +
                                    • Hash256
                                    • Identity
                                    • Interface
                                    • Key
                                    • -
                                    • Keystore
                                    • Ledger
                                    • Lightning
                                    • Logger
                                    • Machine
                                    • -
                                    • Mempool
                                    • Message
                                    • -
                                    • Node
                                    • -
                                    • Oracle
                                    • -
                                    • Path
                                    • Peer
                                    • Reader
                                    • Redis
                                    • Remote
                                    • Resource
                                    • -
                                    • Router
                                    • Scribe
                                    • Script
                                    • Service
                                    • @@ -316,9 +304,8 @@

                                      Classes

                                    • Stash
                                    • State
                                    • Store
                                    • -
                                    • Swap
                                    • Swarm
                                    • -
                                    • Transition
                                    • +
                                    • Token
                                    • Tree
                                    • Value
                                    • Vector
                                    • diff --git a/docs/types_cli.js.html b/docs/types_cli.js.html index 5ab28e7f4..49cfad0d6 100644 --- a/docs/types_cli.js.html +++ b/docs/types_cli.js.html @@ -36,11 +36,10 @@

                                      Source: types/cli.js

                                      // Constants const { MAX_CHAT_MESSAGE_LENGTH, + INPUT_HINT, BITCOIN_GENESIS } = require('../constants'); -const INPUT_HINT = 'Press the "i" key to begin typing.'; - // Internal Dependencies const fs = require('fs'); const EventEmitter = require('events').EventEmitter; @@ -57,11 +56,14 @@

                                      Source: types/cli.js

                                      const Message = require('./message'); const Hash256 = require('./hash256'); const Identity = require('./identity'); +const Filesystem = require('./filesystem'); +const Signer = require('./signer'); const Wallet = require('./wallet'); // Services const Bitcoin = require('../services/bitcoin'); const Lightning = require('../services/lightning'); +// const POC = require('@fabric/poc'); // UI dependencies // TODO: use Jade to render pre-registered components @@ -91,6 +93,7 @@

                                      Source: types/cli.js

                                      // Assign Settings this.settings = merge({ debug: true, + ephemeral: false, listen: false, peering: true, // set to true to start Peer render: true, @@ -107,7 +110,10 @@

                                      Source: types/cli.js

                                      mode: 'socket', path: './stores/lightning-playnet/regtest/lightning-rpc' }, - }, this.settings, settings); + storage: { + path: `${process.env.HOME}/.fabric/console` + } + }, settings); // Properties this.screen = null; @@ -124,6 +130,9 @@

                                      Source: types/cli.js

                                      this.services = {}; this.connections = {}; + this.fs = new Filesystem(this.settings.storage); + this.signer = null; + // State this._state = { anchor: null, @@ -136,7 +145,8 @@

                                      Source: types/cli.js

                                      content: { actors: {}, bitcoin: { - best: null + best: null, + genesis: BITCOIN_GENESIS }, documents: {}, messages: {} @@ -149,7 +159,8 @@

                                      Source: types/cli.js

                                      this._loadPeer(); this._loadBitcoin(); - this._loadLightning(); + if (this.settings.lightning.enable) this._loadLightning(); + // this.poc = new POC(); this.identity = new Identity(this.settings); @@ -159,6 +170,8 @@

                                      Source: types/cli.js

                                      assumeIdentity (key) { this.identity = new Identity(key); + this.signer = new Signer(key); + return this; } attachWallet (wallet) { @@ -169,15 +182,27 @@

                                      Source: types/cli.js

                                      return this; } + flush () { + this.fs.delete('STATE'); + return this; + } + _loadPeer () { + const file = this.fs.readFile('STATE'); + const state = (file) ? JSON.parse(file) : {}; + + // Create and assign Peer instance as the `node` property this.node = new Peer({ + debug: this.settings.debug, network: this.settings.network, interface: this.settings.interface, port: this.settings.port, peers: this.settings.peers, + state: state, upnp: this.settings.upnp, key: this.identity.settings }); + return this; } @@ -192,7 +217,13 @@

                                      Source: types/cli.js

                                      } async bootstrap () { - return true; + try { + await this.fs.start(); + return true; + } catch (exception) { + this._appendError(`Could not bootstrap: ${exception}`) + return false; + } } async tick () { @@ -217,6 +248,7 @@

                                      Source: types/cli.js

                                      this._registerCommand('quit', this._handleQuitRequest); this._registerCommand('exit', this._handleQuitRequest); this._registerCommand('clear', this._handleClearRequest); + this._registerCommand('flush', this._handleFlushRequest); this._registerCommand('alias', this._handleAliasRequest); this._registerCommand('peers', this._handlePeerListRequest); this._registerCommand('rotate', this._handleRotateRequest); @@ -233,6 +265,7 @@

                                      Source: types/cli.js

                                      this._registerCommand('service', this._handleServiceCommand); this._registerCommand('publish', this._handlePublishCommand); this._registerCommand('request', this._handleRequestCommand); + this._registerCommand('grant', this._handleGrantCommand); this._registerCommand('import', this._handleImportCommand); this._registerCommand('join', this._handleJoinRequest); this._registerCommand('sync', this._handleChainSyncRequest); @@ -242,6 +275,13 @@

                                      Source: types/cli.js

                                      this._registerCommand('set', this._handleSetRequest); this._registerCommand('get', this._handleGetRequest); + // Contracts + this._registerCommand('contracts', this._handleContractsRequest); + this._registerCommand('subscribe', this._handleSubscribeRequest); + this._registerCommand('create', this._handleCreateRequest); + this._registerCommand('deploy', this._handleDeployRequest); + this._registerCommand('accept', this._handleAcceptRequest); + // Service Commands this._registerCommand('bitcoin', this._handleBitcoinRequest); this._registerCommand('lightning', this._handleLightningRequest); @@ -272,8 +312,12 @@

                                      Source: types/cli.js

                                      this.node.on('message', this._handlePeerMessage.bind(this)); this.node.on('changes', this._handlePeerChanges.bind(this)); this.node.on('commit', this._handlePeerCommit.bind(this)); + this.node.on('state', this._handlePeerState.bind(this)); this.node.on('chat', this._handlePeerChat.bind(this)); this.node.on('upnp', this._handlePeerUPNP.bind(this)); + this.node.on('actorset', this._handleActorSet.bind(this)); + this.node.on('contractset', this._handleContractSet.bind(this)); + // this.node.on('peerset', this._handlePeerSet.bind(this)); // ## Raw Connections this.node.on('connection', this._handleConnection.bind(this)); @@ -304,15 +348,20 @@

                                      Source: types/cli.js

                                      this.bitcoin.on('transaction', this._handleBitcoinTransaction.bind(this)); // #### Lightning - this.lightning.on('debug', this._handleLightningDebug.bind(this)); - this.lightning.on('ready', this._handleLightningReady.bind(this)); - this.lightning.on('error', this._handleLightningError.bind(this)); - this.lightning.on('warning', this._handleLightningWarning.bind(this)); - this.lightning.on('message', this._handleLightningMessage.bind(this)); - this.lightning.on('log', this._handleLightningLog.bind(this)); - this.lightning.on('commit', this._handleLightningCommit.bind(this)); - this.lightning.on('sync', this._handleLightningSync.bind(this)); - // this.lightning.on('transaction', this._handleLightningTransaction.bind(this)); + if (this.settings.lightning && this.settings.lightning.enable) { + this.lightning.on('debug', this._handleLightningDebug.bind(this)); + this.lightning.on('ready', this._handleLightningReady.bind(this)); + this.lightning.on('error', this._handleLightningError.bind(this)); + this.lightning.on('warning', this._handleLightningWarning.bind(this)); + this.lightning.on('message', this._handleLightningMessage.bind(this)); + this.lightning.on('log', this._handleLightningLog.bind(this)); + this.lightning.on('commit', this._handleLightningCommit.bind(this)); + this.lightning.on('sync', this._handleLightningSync.bind(this)); + // this.lightning.on('transaction', this._handleLightningTransaction.bind(this)); + } + + // this.poc.on('message', this._handlePeerMessage.bind(this)); + // await this.poc.start(); /* this.on('log', function (log) { console.log('local log:', log); @@ -326,6 +375,7 @@

                                      Source: types/cli.js

                                      for (const [name, service] of Object.entries(this.services)) { // Skip when service name not found in settings if (!this.settings.services.includes(name)) continue; + this._appendDebug(`Service "${name}" is enabled. Starting...`); this.trust(this.services[name], name); @@ -349,7 +399,7 @@

                                      Source: types/cli.js

                                      await this.bitcoin.start(); // Start Lightning service - this.lightning.start(); + if (this.settings.lightning.enable) await this.lightning.start(); // ## Start P2P node if (this.settings.peering) this.node.start(); @@ -419,7 +469,7 @@

                                      Source: types/cli.js

                                      // this._appendMessage(`Changes: ${JSON.stringify(changes, null, ' ')}`); this.emit('changes', changes); - this.emit('state', this['@state']); + // this.emit('state', this['@state']); this.emit('message', { '@type': 'Transaction', '@data': { @@ -474,6 +524,21 @@

                                      Source: types/cli.js

                                      this._appendMessage(`{red-fg}${msg}{/red-fg}`); } + async _handleActorSet (actorset) { + this._appendDebug(`[ACTORSET] ${JSON.stringify(actorset, null, ' ')}`); + } + + async _handleContractSet (contractset) { + this._appendDebug(`[CONTRACTSET] ${JSON.stringify(contractset, null, ' ')}`); + this.contracts = contractset; + this.commit(); + } + + async _handlePeerState (state) { + // this._appendDebug(`[STATE] ${JSON.stringify(state, null, ' ')}`); + this.fs.publish('STATE', JSON.stringify(state, null, ' ')); + } + async _handleSourceLog (msg) { this._appendMessage(msg); } @@ -494,6 +559,50 @@

                                      Source: types/cli.js

                                      this._appendMessage(`New Changes: ${JSON.stringify(changes, null, ' ')}`); } + async _handleAcceptRequest (params) { + if (!params || !params[1]) { + this._appendMessage(`You must provide a contract parameter.`); + return false; + } + + const contract = this.contracts[params[1]]; + this._appendMessage(`{bold}Accepting{/bold}: ${params[1]} ${JSON.stringify(contract)}`); + // TODO: sign + return false; + } + + async _handleCreateRequest (params) { + this._appendMessage(`{bold}Creating{/bold}: ${params[1]}`); + const now = (new Date()).toISOString(); + const template = { + created: now, + main: JSON.stringify(async function main () { return {}; }) + }; + + const entity = new Actor(template); + this.contracts[entity.id] = entity; + + if (params[1]) this.aliases[params[1]] = entity.id; + + this._appendDebug(`Created: ${entity.id}`); + return false; + } + + async _handleContractsRequest (params) { + this._appendMessage('{bold}Current Contracts{/bold}: ' + JSON.stringify(this.contracts, null, ' ')); + return false; + } + + async _handleSubscribeRequest (params) { + this._appendMessage('{bold}Subscribing{/bold}: ' + JSON.stringify(params[1], null, ' ')); + return false; + } + + async _handleDeployRequest (params) { + this._appendMessage(`{bold}Deploying{/bold}: ${params[1]}`); + return false; + } + async _handleStateRequest (params) { const value = await this.get(``); this._appendMessage('{bold}Current State{/bold}: ' + JSON.stringify(value, null, ' ')); @@ -531,6 +640,18 @@

                                      Source: types/cli.js

                                      // TODO: create payment channel (@fabric/core/types/channel) } + /** + * Creates a token for the target signer with a provided role and some optional data. + * @param {Array} params Parameters array. + */ + async _handleGrantCommand (params) { + const target = params[1]; + const role = params[2]; + const extra = params[3]; + + this._appendMessage(`Creating token with role "${role}" for target: ${target}${(extra) ? ' (extra: ' + extra + ')' : ''}`); + } + async _handleJoinRequest (params) { if (!params[1]) return this._appendError(`You must specify a sidechain.`); } @@ -553,12 +674,10 @@

                                      Source: types/cli.js

                                      if (!params[1]) return this._appendError(`You must specify the file to publish.`); if (!params[2]) return this._appendError(`You must specify the rate to pay.`); if (!this.documents[params[1]]) return this._appendError(`This file does not exist in the local library.`); - const message = Message.fromVector(['DocumentPublish', { - id: params[1], - content: this.documents[params[1]], - reward: params[2] - }]); - this.node.broadcast(message); + + this.fs.touchDir(`documents`); + this.fs.publish(`${params[1]}`, this.documents[params[1]]); + this.node._publishDocument(params[1], this.documents[params[1]].toString('utf8')); } async _handleRequestCommand (params) { @@ -619,6 +738,7 @@

                                      Source: types/cli.js

                                      } async _handleBitcoinReady (bitcoin) { + this._appendMessage(`Bitcoin ready: ${JSON.stringify(bitcoin)}`); this._syncChainDisplay(); } @@ -632,12 +752,11 @@

                                      Source: types/cli.js

                                      } async _handleConnectionClose (msg) { - this._appendMessage(`Node emitted "connections:close" event: ${JSON.stringify(msg)}`); + this._appendMessage(`Node emitted "connections:close" event: ${JSON.stringify(msg, null, ' ')}`); for (const id in this.peers) { const peer = this.peers[id]; - this._appendMessage(`Checking: ${JSON.stringify(peer)}`); - if (peer.address === msg.address) { + if (peer.address === msg.name) { this._appendMessage(`Address matches.`); delete this.peers[id]; } @@ -645,14 +764,13 @@

                                      Source: types/cli.js

                                      for (const id in this.connections) { const connections = this.connections[id]; - this._appendMessage(`Checking: ${JSON.stringify(connections)}`); if (connections.address === msg.address) { - this._appendMessage(`Address matches.`); delete this.connections[id]; } } this._syncPeerList(); + this._syncConnectionList(); } async _handleConnectionError (msg) { @@ -662,7 +780,7 @@

                                      Source: types/cli.js

                                      async _handleConnection (connection) { if (!connection.id) { // TODO: exit function here - this._appendMessage('Peer did not send an ID. Event received: ' + JSON.stringify(connection)); + this._appendWarning('Peer did not send an ID. Event received: ' + JSON.stringify(connection)); } // TODO: use @fabric/core/types/channel @@ -809,6 +927,10 @@

                                      Source: types/cli.js

                                      this._appendDebug(`[UPNP] ${JSON.stringify(upnp)}`); } + async _handlePeerSet (peerset) { + this._appendDebug(`[PEERSET] ${JSON.stringify(peerset, null, ' ')}`); + } + async _handlePeerMessage (message) { switch (message.type) { case 'ChatMessage': @@ -934,8 +1056,10 @@

                                      Source: types/cli.js

                                      target: '/messages' }; - const message = Message.fromVector(['ChatMessage', JSON.stringify(msg)]); + const message = Message.fromVector(['ChatMessage', JSON.stringify(msg)])._setSigner(this.signer).sign(); // this._appendDebug(`Chat Message created (${message.data.length} bytes): ${message.data}`); + // this.poc._sendChatMessage(msg); + self.setPane('messages'); // Log own message @@ -975,6 +1099,13 @@

                                      Source: types/cli.js

                                      return false; } + _handleFlushRequest () { + this.flush(); + console.log('Fabric store flushed!'); + this.stop(); + return false; + } + _handlePeerListRequest (params) { this._appendMessage('Peers: ' + JSON.stringify(this.peers, null, ' ')); return false; @@ -1102,11 +1233,16 @@

                                      Source: types/cli.js

                                      this._appendMessage(`Local Settings: ${JSON.stringify(this.settings, null, ' ')}`); } - _handleHelpRequest (data) { - const self = this; - const help = `Available Commands:\n${Object.keys(self.commands).map(x => `\t${x}`).join('\n')}`; + _handleHelpRequest (params) { + let text = ''; + + switch (params[1]) { + default: + text = `{bold}Fabric CLI Help{/bold}\nThe Fabric CLI offers a simple command-based interface to a Fabric-speaking Network. You can use \`/connect <address>\` to establish a connection to a known peer, or any of the available commands.\n\n{bold}Available Commands{/bold}:\n\n${Object.keys(this.commands).map(x => `\t${x}`).join('\n')}\n` + break; + } - self._appendMessage(help); + this._appendMessage(text); } _handleServiceMessage (msg) { @@ -1153,7 +1289,7 @@

                                      Source: types/cli.js

                                      } async _syncContracts () { - await this._syncLightningChannels(); + if (this.settings.lightning.enable) await this._syncLightningChannels(); return this; } @@ -1189,6 +1325,10 @@

                                      Source: types/cli.js

                                      const map = {}; for (const [key, value] of Object.entries(x)) { + if ([ + + ].includes(key)) continue; + map[key] = value.toString(); } @@ -1227,6 +1367,25 @@

                                      Source: types/cli.js

                                      return balance; } + _allConfigured () { + if ( + this._isBitcoinConfigured() && + this._isLightningConfigured() + ) { + return true; + } else { + return false; + } + } + + _isBitcoinConfigured () { + return (this.settings.bitcoin) ? true : false; + } + + _isLightningConfigured () { + return (this.settings.lightning) ? true : false; + } + _syncConnectionList () { this.elements['connections'].clearItems(); @@ -1315,11 +1474,13 @@

                                      Source: types/cli.js

                                      focusInput () { this.elements['prompt'].clearValue(); this.elements['prompt'].focus(); + this.elements.modeline.setContent(' INSERT '); this.screen.render(); } defocusInput () { this.elements['prompt'].blur(); + this.elements.modeline.setContent(' META '); this.screen.render(); } @@ -1368,6 +1529,18 @@

                                      Source: types/cli.js

                                      fullUnicode: this.settings.fullUnicode }); + self.elements.modeline = blessed.text({ + parent: self.screen, + content: ' META ', + bottom: 0, + right: 0, + width: 8, + style: { + bg: 'white', + fg: 'black' + } + }); + self.elements['home'] = blessed.box({ parent: self.screen, content: 'Fabric Command Line Interface\nVersion 0.0.1-dev (@martindale)', @@ -1875,44 +2048,32 @@

                                      Home

                                      Classes

                                      • Actor
                                      • -
                                      • Aggregator
                                      • -
                                      • App
                                      • Bitcoin
                                      • +
                                      • CLI
                                      • Chain
                                      • Channel
                                      • Circuit
                                      • -
                                      • CLI
                                      • Collection
                                      • -
                                      • Compiler
                                      • -
                                      • Consensus
                                      • -
                                      • Entity
                                      • Environment
                                      • -
                                      • Exchange
                                      • Fabric
                                      • Federation
                                      • Filesystem
                                      • -
                                      • Hash256
                                      • HKDF
                                      • HTTPServer
                                      • +
                                      • Hash256
                                      • Identity
                                      • Interface
                                      • Key
                                      • -
                                      • Keystore
                                      • Ledger
                                      • Lightning
                                      • Logger
                                      • Machine
                                      • -
                                      • Mempool
                                      • Message
                                      • -
                                      • Node
                                      • -
                                      • Oracle
                                      • -
                                      • Path
                                      • Peer
                                      • Reader
                                      • Redis
                                      • Remote
                                      • Resource
                                      • -
                                      • Router
                                      • Scribe
                                      • Script
                                      • Service
                                      • @@ -1923,9 +2084,8 @@

                                        Classes

                                      • Stash
                                      • State
                                      • Store
                                      • -
                                      • Swap
                                      • Swarm
                                      • -
                                      • Transition
                                      • +
                                      • Token
                                      • Tree
                                      • Value
                                      • Vector
                                      • diff --git a/docs/types_collection.js.html b/docs/types_collection.js.html index 438c2f9f6..a3afa33ed 100644 --- a/docs/types_collection.js.html +++ b/docs/types_collection.js.html @@ -533,44 +533,32 @@

                                        Home

                                        Classes

                                        • Actor
                                        • -
                                        • Aggregator
                                        • -
                                        • App
                                        • Bitcoin
                                        • +
                                        • CLI
                                        • Chain
                                        • Channel
                                        • Circuit
                                        • -
                                        • CLI
                                        • Collection
                                        • -
                                        • Compiler
                                        • -
                                        • Consensus
                                        • -
                                        • Entity
                                        • Environment
                                        • -
                                        • Exchange
                                        • Fabric
                                        • Federation
                                        • Filesystem
                                        • -
                                        • Hash256
                                        • HKDF
                                        • HTTPServer
                                        • +
                                        • Hash256
                                        • Identity
                                        • Interface
                                        • Key
                                        • -
                                        • Keystore
                                        • Ledger
                                        • Lightning
                                        • Logger
                                        • Machine
                                        • -
                                        • Mempool
                                        • Message
                                        • -
                                        • Node
                                        • -
                                        • Oracle
                                        • -
                                        • Path
                                        • Peer
                                        • Reader
                                        • Redis
                                        • Remote
                                        • Resource
                                        • -
                                        • Router
                                        • Scribe
                                        • Script
                                        • Service
                                        • @@ -581,9 +569,8 @@

                                          Classes

                                        • Stash
                                        • State
                                        • Store
                                        • -
                                        • Swap
                                        • Swarm
                                        • -
                                        • Transition
                                        • +
                                        • Token
                                        • Tree
                                        • Value
                                        • Vector
                                        • diff --git a/docs/types_compiler.js.html b/docs/types_compiler.js.html index 6f3873251..6885d3c80 100644 --- a/docs/types_compiler.js.html +++ b/docs/types_compiler.js.html @@ -78,19 +78,7 @@

                                          Source: types/compiler.js

                                          // ``` // This will auto-configure validation base from chain of greatest work. -/** - * Compilers build interfaces for users of Fabric applications. - * @type {Actor} - * @property {AST} ast Compiler's current AST. - * @property {Entity} entity Compiler's current {@link Entity}. - */ class Compiler { - /** - * Create a new Compiler. - * @param {Object} settings={} Configuration. - * @param {Buffer} settings.body Body of the input program to compile. - * @return {Compiler} Instance of the compiler. - */ constructor (settings = {}) { this.settings = Object.assign({ ast: null, @@ -331,44 +319,32 @@

                                          Home

                                          Classes

                                          • Actor
                                          • -
                                          • Aggregator
                                          • -
                                          • App
                                          • Bitcoin
                                          • +
                                          • CLI
                                          • Chain
                                          • Channel
                                          • Circuit
                                          • -
                                          • CLI
                                          • Collection
                                          • -
                                          • Compiler
                                          • -
                                          • Consensus
                                          • -
                                          • Entity
                                          • Environment
                                          • -
                                          • Exchange
                                          • Fabric
                                          • Federation
                                          • Filesystem
                                          • -
                                          • Hash256
                                          • HKDF
                                          • HTTPServer
                                          • +
                                          • Hash256
                                          • Identity
                                          • Interface
                                          • Key
                                          • -
                                          • Keystore
                                          • Ledger
                                          • Lightning
                                          • Logger
                                          • Machine
                                          • -
                                          • Mempool
                                          • Message
                                          • -
                                          • Node
                                          • -
                                          • Oracle
                                          • -
                                          • Path
                                          • Peer
                                          • Reader
                                          • Redis
                                          • Remote
                                          • Resource
                                          • -
                                          • Router
                                          • Scribe
                                          • Script
                                          • Service
                                          • @@ -379,9 +355,8 @@

                                            Classes

                                          • Stash
                                          • State
                                          • Store
                                          • -
                                          • Swap
                                          • Swarm
                                          • -
                                          • Transition
                                          • +
                                          • Token
                                          • Tree
                                          • Value
                                          • Vector
                                          • diff --git a/docs/types_contract.js.html b/docs/types_contract.js.html index ad0dfefb5..b0b1a802d 100644 --- a/docs/types_contract.js.html +++ b/docs/types_contract.js.html @@ -33,13 +33,20 @@

                                            Source: types/contract.js

                                            'use strict';
                                             
                                            +// Generics
                                            +const crypto = require('crypto');
                                            +
                                             // Dependencies
                                            +// const Template = require('@babel/template');
                                            +// const Generate = require('@babel/generator');
                                            +// const t = require('@babel/types');
                                             const parser = require('dotparser');
                                            +const monitor = require('fast-json-patch');
                                             
                                             // Fabric Types
                                             const Actor = require('./actor');
                                            -const Hash256 = require('./hash256');
                                             const Key = require('./key');
                                            +const Message = require('./message');
                                             const Service = require('./service');
                                             const Signer = require('./signer');
                                             
                                            @@ -69,6 +76,9 @@ 

                                            Source: types/contract.js

                                            // tweaked pubkey this.key = new Key(this.settings.key); + this.signer = new Signer(this.settings.key); + this.messages = {}; + this._inner = null; this._state = { status: 'PAUSED', @@ -78,6 +88,8 @@

                                            Source: types/contract.js

                                            content: this.settings.state }; + this.observer = monitor.observe(this._state.content); + return this; } @@ -95,12 +107,42 @@

                                            Source: types/contract.js

                                            return contract; }; + static fromJavaScript (js) { + const buildAST = Template.template(js); + const ast = buildAST({}); + return new Contract({ ast }); + } + static fromGraph (graphs) { const circuit = { stack: [], nodes: [] }; + for (let i = 0; i < graphs.length; i++) { + const graph = graphs[i]; + const node = { + name: graph.id + }; + + circuit.nodes.push(node); + + if (!graph.children.length) continue; + for (let j = 0; j < graph.children.length; j++) { + const child = graph.children[j]; + switch (child.type) { + default: + console.warn(`Unhandled type: "${child.type}'" on child:`, child); + break; + case 'node_stmt': + circuit.nodes.push({ + name: child.node_id.id + }); + break; + } + } + } + return circuit; } @@ -112,6 +154,70 @@

                                            Source: types/contract.js

                                            return contract.trim(); } + /** + * Deploys the contract. + * @returns {String} Message ID. + */ + deploy () { + // Attest to local time + const now = (new Date()).toISOString(); + const input = { + clock: 0, + validators: [] + }; + + // First message (genesis) + const PACKET_CONTRACT_GENESIS = Message.fromVector(['CONTRACT_GENESIS', JSON.stringify({ + type: 'CONTRACT_GENESIS', + object: { + input: input + } + })])._setSigner(this.signer).sign().toBuffer(); + + // Get hash of message + const hash = crypto.createHash('sha256').update(PACKET_CONTRACT_GENESIS).digest('hex'); + + // Store locally + this.messages[hash] = PACKET_CONTRACT_GENESIS.toString('hex'); + + // Contract template + const template = { + author: this.signer.pubkey, + bond: null, // BTC transaction which is spent + checksum: '', + created: now, + genesis: hash, + history: [ hash ], // most recent first + messages: this.messages, + name: this.settings.name, + signature: '', + state: input, + version: 1 + }; + + // Track our contract by Actor ID + this.actor = new Actor(template); + this.emit('log', `Deploying Contract [0x${this.actor.id}] (${PACKET_CONTRACT_GENESIS.byteLength} bytes): ${this.messages[hash]}`); + + // Network publish message (contract) + const PACKET_CONTRACT_PUBLISH = Message.fromVector(['CONTRACT_PUBLISH', JSON.stringify({ + type: 'CONTRACT_PUBLISH', + object: template + })]); + + const signed = PACKET_CONTRACT_PUBLISH._setSigner(this.signer).sign(); + const pubhash = crypto.createHash('sha256').update(signed.toBuffer()).digest('hex'); + + this.messages[pubhash] = PACKET_CONTRACT_PUBLISH.toString('hex'); + this.emit('message', signed); + + return this; + } + + toDot () { + const tokens = []; + } + parse (input) { return this.parseDot(input); } @@ -132,18 +238,28 @@

                                            Source: types/contract.js

                                            } commit () { - super.commit(); + const now = new Date(); + const changes = monitor.generate(this.observer); + + if (changes.length) { + const message = Message.fromVector(['CONTRACT_MESSAGE', { + type: 'CONTRACT_MESSAGE', + object: { + contract: this.id, + ops: changes + } + }]); + + this.emit('changes', changes); + this.emit('message', message); + } - const template = { - // created: (new Date()).toISOString(), + this.emit('commit', { + created: now.toISOString(), state: this.state - }; - - const actor = new Actor(template); - - this.emit('contract:commit', actor.toGenericMessage()); + }); - return {}; + return this; } execute () { @@ -184,6 +300,11 @@

                                            Source: types/contract.js

                                            }); } + _handleBitcoinTransaction () { + // TODO: parse on-chain transaction for update to contract balance + // Does this transaction pay to this contract? + } + _toUnsignedTransaction () { return { script: this.contract @@ -204,44 +325,32 @@

                                            Home

                                            Classes

                                            • Actor
                                            • -
                                            • Aggregator
                                            • -
                                            • App
                                            • Bitcoin
                                            • +
                                            • CLI
                                            • Chain
                                            • Channel
                                            • Circuit
                                            • -
                                            • CLI
                                            • Collection
                                            • -
                                            • Compiler
                                            • -
                                            • Consensus
                                            • -
                                            • Entity
                                            • Environment
                                            • -
                                            • Exchange
                                            • Fabric
                                            • Federation
                                            • Filesystem
                                            • -
                                            • Hash256
                                            • HKDF
                                            • HTTPServer
                                            • +
                                            • Hash256
                                            • Identity
                                            • Interface
                                            • Key
                                            • -
                                            • Keystore
                                            • Ledger
                                            • Lightning
                                            • Logger
                                            • Machine
                                            • -
                                            • Mempool
                                            • Message
                                            • -
                                            • Node
                                            • -
                                            • Oracle
                                            • -
                                            • Path
                                            • Peer
                                            • Reader
                                            • Redis
                                            • Remote
                                            • Resource
                                            • -
                                            • Router
                                            • Scribe
                                            • Script
                                            • Service
                                            • @@ -252,9 +361,8 @@

                                              Classes

                                            • Stash
                                            • State
                                            • Store
                                            • -
                                            • Swap
                                            • Swarm
                                            • -
                                            • Transition
                                            • +
                                            • Token
                                            • Tree
                                            • Value
                                            • Vector
                                            • diff --git a/docs/types_document.js.html b/docs/types_document.js.html index e984bbc42..582a03da0 100644 --- a/docs/types_document.js.html +++ b/docs/types_document.js.html @@ -87,44 +87,32 @@

                                              Home

                                              Classes

                                              • Actor
                                              • -
                                              • Aggregator
                                              • -
                                              • App
                                              • Bitcoin
                                              • +
                                              • CLI
                                              • Chain
                                              • Channel
                                              • Circuit
                                              • -
                                              • CLI
                                              • Collection
                                              • -
                                              • Compiler
                                              • -
                                              • Consensus
                                              • -
                                              • Entity
                                              • Environment
                                              • -
                                              • Exchange
                                              • Fabric
                                              • Federation
                                              • Filesystem
                                              • -
                                              • Hash256
                                              • HKDF
                                              • HTTPServer
                                              • +
                                              • Hash256
                                              • Identity
                                              • Interface
                                              • Key
                                              • -
                                              • Keystore
                                              • Ledger
                                              • Lightning
                                              • Logger
                                              • Machine
                                              • -
                                              • Mempool
                                              • Message
                                              • -
                                              • Node
                                              • -
                                              • Oracle
                                              • -
                                              • Path
                                              • Peer
                                              • Reader
                                              • Redis
                                              • Remote
                                              • Resource
                                              • -
                                              • Router
                                              • Scribe
                                              • Script
                                              • Service
                                              • @@ -135,9 +123,8 @@

                                                Classes

                                              • Stash
                                              • State
                                              • Store
                                              • -
                                              • Swap
                                              • Swarm
                                              • -
                                              • Transition
                                              • +
                                              • Token
                                              • Tree
                                              • Value
                                              • Vector
                                              • diff --git a/docs/types_entity.js.html b/docs/types_entity.js.html index 8888242a8..0505408f2 100644 --- a/docs/types_entity.js.html +++ b/docs/types_entity.js.html @@ -36,16 +36,7 @@

                                                Source: types/entity.js

                                                const crypto = require('crypto'); const { EventEmitter } = require('events'); -/** - * Live instance of an ARC in Fabric. - * @type {Object} - */ class Entity extends EventEmitter { - /** - * Generic template for virtual objects. - * @param {Object} [data={}] Pass an object to use. - * @return {Entity} Instance of the {@link Entity}. - */ constructor (data = {}) { super(data); @@ -228,44 +219,32 @@

                                                Home

                                                Classes

                                                • Actor
                                                • -
                                                • Aggregator
                                                • -
                                                • App
                                                • Bitcoin
                                                • +
                                                • CLI
                                                • Chain
                                                • Channel
                                                • Circuit
                                                • -
                                                • CLI
                                                • Collection
                                                • -
                                                • Compiler
                                                • -
                                                • Consensus
                                                • -
                                                • Entity
                                                • Environment
                                                • -
                                                • Exchange
                                                • Fabric
                                                • Federation
                                                • Filesystem
                                                • -
                                                • Hash256
                                                • HKDF
                                                • HTTPServer
                                                • +
                                                • Hash256
                                                • Identity
                                                • Interface
                                                • Key
                                                • -
                                                • Keystore
                                                • Ledger
                                                • Lightning
                                                • Logger
                                                • Machine
                                                • -
                                                • Mempool
                                                • Message
                                                • -
                                                • Node
                                                • -
                                                • Oracle
                                                • -
                                                • Path
                                                • Peer
                                                • Reader
                                                • Redis
                                                • Remote
                                                • Resource
                                                • -
                                                • Router
                                                • Scribe
                                                • Script
                                                • Service
                                                • @@ -276,9 +255,8 @@

                                                  Classes

                                                • Stash
                                                • State
                                                • Store
                                                • -
                                                • Swap
                                                • Swarm
                                                • -
                                                • Transition
                                                • +
                                                • Token
                                                • Tree
                                                • Value
                                                • Vector
                                                • diff --git a/docs/types_environment.js.html b/docs/types_environment.js.html index 1e9cf915c..09bc18680 100644 --- a/docs/types_environment.js.html +++ b/docs/types_environment.js.html @@ -43,6 +43,7 @@

                                                  Source: types/environment.js

                                                  const merge = require('lodash.merge'); // Fabric Types +const Actor = require('./actor'); const Entity = require('./entity'); const EncryptedPromise = require('./promise'); const Wallet = require('./wallet'); @@ -65,6 +66,9 @@

                                                  Source: types/environment.js

                                                  this.settings = merge({ home: process.env.HOME, path: process.env.HOME + '/.fabric/wallet.json', + state: { + status: 'INITIALIZED' + }, store: process.env.HOME + '/.fabric' }, this.settings, settings); @@ -72,14 +76,22 @@

                                                  Source: types/environment.js

                                                  this.wallet = null; this._state = { - status: 'INITIALIZED', - content: {}, + status: this.settings.state.status, + content: this.settings.state, variables: process.env }; return this; } + get state () { + return JSON.parse(JSON.stringify(this._state.content)); + } + + get status () { + return this._state.status; + } + get SEED_FILE () { return '.FABRIC_SEED'; } @@ -102,6 +114,7 @@

                                                  Source: types/environment.js

                                                  get seed () { return [ + FIXTURE_SEED, this.settings.seed, this['FABRIC_SEED'], this.readVariable('FABRIC_SEED') @@ -110,9 +123,21 @@

                                                  Source: types/environment.js

                                                  get xprv () { return [ + // FIXTURE_XPRV, this.settings.xprv, this['FABRIC_XPRV'], - this.readVariable('FABRIC_XPRV') + this.readVariable('FABRIC_XPRV'), + this.wallet.xprv + ].find(any); + } + + get xpub () { + return [ + // FIXTURE_XPUB, + this.settings.xpub, + this['FABRIC_XPUB'], + this.readVariable('FABRIC_XPUB'), + this.wallet.xpub ].find(any); } @@ -156,6 +181,8 @@

                                                  Source: types/environment.js

                                                  loadWallet () { if (this.seed) { + // console.log('Seed was provided:', this.seed); + this.wallet = new Wallet({ key: { seed: this.seed, @@ -163,12 +190,16 @@

                                                  Source: types/environment.js

                                                  } }); } else if (this.xprv) { + // console.log('xprv was provided:', this.xprv); + this.wallet = new Wallet({ key: { xprv: this.xprv } }); } else if (this.xpub) { + // console.log('xpub was provided:', this.xpub); + this.wallet = new Wallet({ key: { xpub: this.xpub @@ -292,6 +323,7 @@

                                                  Source: types/environment.js

                                                  this.loadWallet(); + // if (this.local) this.wallet = new Wallet(this.local); if (this.wallet) this.wallet.start(); this._state.status = 'STARTED'; @@ -303,6 +335,21 @@

                                                  Source: types/environment.js

                                                  this._state.status = 'STOPPED'; return this; } + + verify () { + const state = new Actor(this.state); + if (state.id !== '3c141a17b967d9d50770ebcc3beac9f3bd695f728e8f4fb8988d913794998078') throw new Error(`Incorrect state: ${state.id}`); + + if (![ + 'INITIALIZED', + 'STARTED', + 'STARTING', + 'STOPPED', + 'STOPPING' + ].includes(this.status)) throw new Error(`Invalid status: ${this.status}`); + + return true; + } } module.exports = Environment; @@ -318,44 +365,32 @@

                                                  Home

                                                  Classes

                                                  • Actor
                                                  • -
                                                  • Aggregator
                                                  • -
                                                  • App
                                                  • Bitcoin
                                                  • +
                                                  • CLI
                                                  • Chain
                                                  • Channel
                                                  • Circuit
                                                  • -
                                                  • CLI
                                                  • Collection
                                                  • -
                                                  • Compiler
                                                  • -
                                                  • Consensus
                                                  • -
                                                  • Entity
                                                  • Environment
                                                  • -
                                                  • Exchange
                                                  • Fabric
                                                  • Federation
                                                  • Filesystem
                                                  • -
                                                  • Hash256
                                                  • HKDF
                                                  • HTTPServer
                                                  • +
                                                  • Hash256
                                                  • Identity
                                                  • Interface
                                                  • Key
                                                  • -
                                                  • Keystore
                                                  • Ledger
                                                  • Lightning
                                                  • Logger
                                                  • Machine
                                                  • -
                                                  • Mempool
                                                  • Message
                                                  • -
                                                  • Node
                                                  • -
                                                  • Oracle
                                                  • -
                                                  • Path
                                                  • Peer
                                                  • Reader
                                                  • Redis
                                                  • Remote
                                                  • Resource
                                                  • -
                                                  • Router
                                                  • Scribe
                                                  • Script
                                                  • Service
                                                  • @@ -366,9 +401,8 @@

                                                    Classes

                                                  • Stash
                                                  • State
                                                  • Store
                                                  • -
                                                  • Swap
                                                  • Swarm
                                                  • -
                                                  • Transition
                                                  • +
                                                  • Token
                                                  • Tree
                                                  • Value
                                                  • Vector
                                                  • diff --git a/docs/types_fabric.js.html b/docs/types_fabric.js.html index b40987d45..482401831 100644 --- a/docs/types_fabric.js.html +++ b/docs/types_fabric.js.html @@ -51,9 +51,8 @@

                                                    Source: types/fabric.js

                                                    const Machine = require('../types/machine'); const Message = require('../types/message'); const Observer = require('../types/observer'); -const Opcode = require('../types/opcode'); const Oracle = require('../types/oracle'); -const Peer = require('./peer'); +const Peer = require('../types/peer'); const Program = require('../types/program'); const Remote = require('../types/remote'); const Resource = require('../types/resource'); @@ -155,7 +154,7 @@

                                                    Source: types/fabric.js

                                                    static get Stack () { return Stack; } static get State () { return State; } static get Store () { return Store; } - static get Swarm () { return Swarm; } + // static get Swarm () { return Swarm; } // static get Transaction () { return Transaction; } static get Vector () { return Vector; } static get Wallet () { return Wallet; } @@ -278,7 +277,7 @@

                                                    Source: types/fabric.js

                                                    use (name, description) { this.log('[FABRIC]', `defining <code>${name}</code> as:`, description); - this.opcodes[name] = new Opcode(description); + this.opcodes[name] = description.bind(this); return this.define(name, description); } @@ -454,44 +453,32 @@

                                                    Home

                                                    Classes

                                                    • Actor
                                                    • -
                                                    • Aggregator
                                                    • -
                                                    • App
                                                    • Bitcoin
                                                    • +
                                                    • CLI
                                                    • Chain
                                                    • Channel
                                                    • Circuit
                                                    • -
                                                    • CLI
                                                    • Collection
                                                    • -
                                                    • Compiler
                                                    • -
                                                    • Consensus
                                                    • -
                                                    • Entity
                                                    • Environment
                                                    • -
                                                    • Exchange
                                                    • Fabric
                                                    • Federation
                                                    • Filesystem
                                                    • -
                                                    • Hash256
                                                    • HKDF
                                                    • HTTPServer
                                                    • +
                                                    • Hash256
                                                    • Identity
                                                    • Interface
                                                    • Key
                                                    • -
                                                    • Keystore
                                                    • Ledger
                                                    • Lightning
                                                    • Logger
                                                    • Machine
                                                    • -
                                                    • Mempool
                                                    • Message
                                                    • -
                                                    • Node
                                                    • -
                                                    • Oracle
                                                    • -
                                                    • Path
                                                    • Peer
                                                    • Reader
                                                    • Redis
                                                    • Remote
                                                    • Resource
                                                    • -
                                                    • Router
                                                    • Scribe
                                                    • Script
                                                    • Service
                                                    • @@ -502,9 +489,8 @@

                                                      Classes

                                                    • Stash
                                                    • State
                                                    • Store
                                                    • -
                                                    • Swap
                                                    • Swarm
                                                    • -
                                                    • Transition
                                                    • +
                                                    • Token
                                                    • Tree
                                                    • Value
                                                    • Vector
                                                    • diff --git a/docs/types_federation.js.html b/docs/types_federation.js.html index 2f3f35d4c..caf317aab 100644 --- a/docs/types_federation.js.html +++ b/docs/types_federation.js.html @@ -123,7 +123,7 @@

                                                      Source: types/federation.js

                                                      const policy = run(` $A = ${this._state.content.validators[index]}; pk($A) - `); + ` || this.contract); const miniscript = run(`miniscript(${policy})`); const descriptor = run(`wsh(${miniscript})`); @@ -190,44 +190,32 @@

                                                      Home

                                                      Classes

                                                      • Actor
                                                      • -
                                                      • Aggregator
                                                      • -
                                                      • App
                                                      • Bitcoin
                                                      • +
                                                      • CLI
                                                      • Chain
                                                      • Channel
                                                      • Circuit
                                                      • -
                                                      • CLI
                                                      • Collection
                                                      • -
                                                      • Compiler
                                                      • -
                                                      • Consensus
                                                      • -
                                                      • Entity
                                                      • Environment
                                                      • -
                                                      • Exchange
                                                      • Fabric
                                                      • Federation
                                                      • Filesystem
                                                      • -
                                                      • Hash256
                                                      • HKDF
                                                      • HTTPServer
                                                      • +
                                                      • Hash256
                                                      • Identity
                                                      • Interface
                                                      • Key
                                                      • -
                                                      • Keystore
                                                      • Ledger
                                                      • Lightning
                                                      • Logger
                                                      • Machine
                                                      • -
                                                      • Mempool
                                                      • Message
                                                      • -
                                                      • Node
                                                      • -
                                                      • Oracle
                                                      • -
                                                      • Path
                                                      • Peer
                                                      • Reader
                                                      • Redis
                                                      • Remote
                                                      • Resource
                                                      • -
                                                      • Router
                                                      • Scribe
                                                      • Script
                                                      • Service
                                                      • @@ -238,9 +226,8 @@

                                                        Classes

                                                      • Stash
                                                      • State
                                                      • Store
                                                      • -
                                                      • Swap
                                                      • Swarm
                                                      • -
                                                      • Transition
                                                      • +
                                                      • Token
                                                      • Tree
                                                      • Value
                                                      • Vector
                                                      • diff --git a/docs/types_filesystem.js.html b/docs/types_filesystem.js.html index d2773ad03..6f1207c93 100644 --- a/docs/types_filesystem.js.html +++ b/docs/types_filesystem.js.html @@ -68,7 +68,8 @@

                                                        Source: types/filesystem.js

                                                        this._state = { actors: {}, content: { - files: [] + files: [], + status: 'INITIALIZED' }, documents: {} }; @@ -104,6 +105,12 @@

                                                        Source: types/filesystem.js

                                                        return this._state.documents; } + delete (name) { + const file = path.join(this.path, name); + if (fs.existsSync(file)) fs.rmSync(file); + return true; + } + /** * Get the list of files. * @returns {Array} List of files. @@ -155,11 +162,23 @@

                                                        Source: types/filesystem.js

                                                        fs.writeFileSync(file, content); return true; } catch (exception) { - this.emit('error', `Could not write file: ${content}`); + this.emit('error', `Could not write file: ${content} ${exception}`); return false; } } + _handleDiskChange (type, filename) { + this.emit('file:update', { + name: filename, + type: type + }); + + // TODO: only sync changed files + // this._loadFromDisk(); + + return this; + } + /** * Load Filesystem state from disk. * @returns {Promise} Resolves with Filesystem instance. @@ -217,8 +236,20 @@

                                                        Source: types/filesystem.js

                                                        } async start () { + console.debug('[FILESYSTEM]', 'Starting filesystem:', this.path); + this._state.content.status = 'STARTING'; + this.touchDir(this.path); // ensure exists - await this.sync(); + this.sync(); + + fs.watch(this.path, { + persistent: false, + recursive: true + }, this._handleDiskChange.bind(this)); + + this._state.content.status = 'STARTED'; + this.commit(); + return this; } @@ -251,44 +282,32 @@

                                                        Home

                                                        Classes

                                                        • Actor
                                                        • -
                                                        • Aggregator
                                                        • -
                                                        • App
                                                        • Bitcoin
                                                        • +
                                                        • CLI
                                                        • Chain
                                                        • Channel
                                                        • Circuit
                                                        • -
                                                        • CLI
                                                        • Collection
                                                        • -
                                                        • Compiler
                                                        • -
                                                        • Consensus
                                                        • -
                                                        • Entity
                                                        • Environment
                                                        • -
                                                        • Exchange
                                                        • Fabric
                                                        • Federation
                                                        • Filesystem
                                                        • -
                                                        • Hash256
                                                        • HKDF
                                                        • HTTPServer
                                                        • +
                                                        • Hash256
                                                        • Identity
                                                        • Interface
                                                        • Key
                                                        • -
                                                        • Keystore
                                                        • Ledger
                                                        • Lightning
                                                        • Logger
                                                        • Machine
                                                        • -
                                                        • Mempool
                                                        • Message
                                                        • -
                                                        • Node
                                                        • -
                                                        • Oracle
                                                        • -
                                                        • Path
                                                        • Peer
                                                        • Reader
                                                        • Redis
                                                        • Remote
                                                        • Resource
                                                        • -
                                                        • Router
                                                        • Scribe
                                                        • Script
                                                        • Service
                                                        • @@ -299,9 +318,8 @@

                                                          Classes

                                                        • Stash
                                                        • State
                                                        • Store
                                                        • -
                                                        • Swap
                                                        • Swarm
                                                        • -
                                                        • Transition
                                                        • +
                                                        • Token
                                                        • Tree
                                                        • Value
                                                        • Vector
                                                        • diff --git a/docs/types_hash256.js.html b/docs/types_hash256.js.html index 0fbb93c78..435c81536 100644 --- a/docs/types_hash256.js.html +++ b/docs/types_hash256.js.html @@ -33,7 +33,7 @@

                                                          Source: types/hash256.js

                                                          'use strict';
                                                           
                                                          -const crypto = require('crypto');
                                                          +const { sha256 } = require('@noble/hashes/sha256');
                                                           
                                                           /**
                                                            * Simple interaction with 256-bit spaces.
                                                          @@ -49,11 +49,29 @@ 

                                                          Source: types/hash256.js

                                                          */ constructor (settings = {}) { if (typeof settings === 'string') settings = { input: settings }; - if (!settings.input) settings.input = crypto.randomBytes(32).toString('hex'); + if (!settings.input) { + if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) { + settings.input = window.crypto.getRandomValues(new Uint8Array(32)).join(''); + } else { + settings.input = require('crypto').randomBytes(32).toString('hex'); + } + } + + // Ensure the input can be cast to a buffer + const buffer = Buffer.from(settings.input, 'utf8'); + // Settings this.settings = Object.assign({ - hash: Hash256.digest(settings.input) + hash: Hash256.digest(buffer) }, settings); + + return this; + } + + static compute (input) { + if (typeof input === 'string') input = Buffer.from(input, 'utf8'); + const buffer = sha256(input); + return Buffer.from(buffer).toString('hex'); } /** @@ -66,8 +84,11 @@

                                                          Source: types/hash256.js

                                                          throw new Error(`Input to process must be of type "String" or "Buffer" to digest.`); } - // consume and output as string - return crypto.createHash('sha256').update(input).digest('hex'); + return Hash256.compute(input); + } + + get hash () { + return this.value; } // TODO: document `hash256.value` @@ -82,12 +103,22 @@

                                                          Source: types/hash256.js

                                                          return Buffer.from(input, 'hex').reverse().toString('hex'); } + static async hash (input) { + const encoder = new TextEncoder(); + const dataBuffer = encoder.encode(input); + const hashBuffer = await crypto.subtle.digest('SHA-256', dataBuffer); + const hashArray = Array.from(new Uint8Array(hashBuffer)); + const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join(''); + return hashHex; + } + reverse (input = this.value) { return Hash256.reverse(input); } } -module.exports = Hash256;
                                                          +module.exports = Hash256; +
                                            @@ -99,44 +130,32 @@

                                            Home

                                            Classes

                          @@ -76,44 +69,32 @@

                          Home

                          Classes

                          • Actor
                          • -
                          • Aggregator
                          • -
                          • App
                          • Bitcoin
                          • +
                          • CLI
                          • Chain
                          • Channel
                          • Circuit
                          • -
                          • CLI
                          • Collection
                          • -
                          • Compiler
                          • -
                          • Consensus
                          • -
                          • Entity
                          • Environment
                          • -
                          • Exchange
                          • Fabric
                          • Federation
                          • Filesystem
                          • -
                          • Hash256
                          • HKDF
                          • HTTPServer
                          • +
                          • Hash256
                          • Identity
                          • Interface
                          • Key
                          • -
                          • Keystore
                          • Ledger
                          • Lightning
                          • Logger
                          • Machine
                          • -
                          • Mempool
                          • Message
                          • -
                          • Node
                          • -
                          • Oracle
                          • -
                          • Path
                          • Peer
                          • Reader
                          • Redis
                          • Remote
                          • Resource
                          • -
                          • Router
                          • Scribe
                          • Script
                          • Service
                          • @@ -124,9 +105,8 @@

                            Classes

                          • Stash
                          • State
                          • Store
                          • -
                          • Swap
                          • Swarm
                          • -
                          • Transition
                          • +
                          • Token
                          • Tree
                          • Value
                          • Vector
                          • diff --git a/docs/types_peer.js.html b/docs/types_peer.js.html index 6f29dd847..fde3b762d 100644 --- a/docs/types_peer.js.html +++ b/docs/types_peer.js.html @@ -35,30 +35,28 @@

                            Source: types/peer.js

                            // Constants const { + FABRIC_KEY_DERIVATION_PATH, P2P_IDENT_REQUEST, P2P_IDENT_RESPONSE, P2P_ROOT, P2P_PING, P2P_PONG, + P2P_PORT, P2P_START_CHAIN, P2P_INSTRUCTION, P2P_BASE_MESSAGE, P2P_STATE_COMMITTMENT, P2P_STATE_CHANGE, - P2P_STATE_ROOT, - ZERO_LENGTH_PLAINTEXT + P2P_STATE_ROOT } = require('../constants'); -// Internals +// Dependencies const net = require('net'); const crypto = require('crypto'); const stream = require('stream'); const manager = require('fast-json-patch'); const noise = require('noise-protocol-stream'); - -// Dependencies const merge = require('lodash.merge'); -const upnp = require('nat-upnp'); // Fabric Types const Actor = require('./actor'); @@ -68,8 +66,6 @@

                            Source: types/peer.js

                            const Machine = require('./machine'); const Message = require('./message'); const Service = require('./service'); -const Session = require('./session'); -const Reader = require('./reader'); const Wallet = require('./wallet'); // Constants @@ -94,16 +90,25 @@

                            Source: types/peer.js

                            this.settings = merge({ constraints: { peers: { - max: 32, + max: 0, shuffle: 8 } }, interface: '0.0.0.0', + interval: 60000, // 1 minute network: 'regtest', networking: true, listen: true, peers: [], port: 7777, + state: Object.assign({ + actors: {}, + channels: {}, + contracts: {}, + documents: {}, + messages: {}, + services: {} + }, config.state), upnp: false, key: {} }, config); @@ -112,16 +117,15 @@

                            Source: types/peer.js

                            this.upnp = null; this.server = net.createServer(this._NOISESocketHandler.bind(this)); this.stream = new stream.Transform({ - transform (chunk, encoding, callback) { - // TODO: parse as encrypted data - callback(null, chunk); + transform (chunk, encoding, done) { + done(null, chunk); } }); this.identity = new Identity(this.settings.key); this.signer = new Signer(this.settings.key); this.key = new Key(this.settings.key); - this.wallet = new Wallet(this.settings.key); + // this.wallet = new Wallet(this.settings.key); // this.hex = this.key.public.encodeCompressed('hex'); // this.pkh = crypto.createHash('sha256').update(this.hex).digest('hex'); @@ -133,13 +137,18 @@

                            Source: types/peer.js

                            }; // Internal properties + this.actors = {}; + this.contracts = {}; this.chains = {}; this.candidates = []; this.connections = {}; + this.history = []; this.peers = {}; + this.mailboxes = {}; this.memory = {}; this.handlers = {}; this.messages = new Set(); + this.sessions = {}; // Internal Stack Machine this.machine = new Machine(); @@ -153,9 +162,7 @@

                            Source: types/peer.js

                            }; this._state = { - content: { - messages: {} - }, + content: this.settings.state, peers: {}, chains: {}, connections: {}, @@ -175,11 +182,6 @@

                            Source: types/peer.js

                            return this.key.pubkeyhash; } - get state () { - // TODO: use Proxy - return Object.assign({}, this._state); - } - /** * @deprecated */ @@ -187,6 +189,55 @@

                            Source: types/peer.js

                            return this.settings.interface || this.settings.address; } + get documentation () { + return { + name: 'Fabric', + description: 'Manages connections to the Fabric Network.', + methods: { + ack: { + description: 'Acknowledge a message.', + parameters: { + message: { + // TODO: consider making this a FabricMessageID + type: 'FabricMessage', + description: 'The message to acknowledge.' + } + }, + returns: { + type: 'Promise', + description: 'A Promise which resolves to the completed FabricState.' + } + }, + send: { + description: 'Send a message to a connected peer.', + parameters: { + message: { + type: 'FabricMessage', + description: 'The message to send to the peer.' + } + }, + returns: { + type: 'Promise', + description: 'A Promise which resolves to the response (if any).' + } + }, + broadcast: { + description: 'Broadcast a message to all connected nodes.', + parameters: { + message: { + type: 'FabricMessage', + description: 'The message to send to the node.' + } + }, + returns: { + type: 'Promise', + description: 'A Promise which resolves to the responses (if any).' + } + } + } + } + } + get interface () { return this.settings.interface || this.settings.address; } @@ -195,10 +246,6 @@

                            Source: types/peer.js

                            return this.settings.port || 7777; } - set state (value) { - this._state.content = value; - } - beat () { const initial = new Actor(this.state); const now = (new Date()).toISOString(); @@ -213,54 +260,76 @@

                            Source: types/peer.js

                            return this; } + /** + * Write a {@link Buffer} to all connected peers. + * @param {Buffer} message Message buffer to send. + */ broadcast (message, origin = null) { - for (const id in this.peers) { + console.debug('broadcasting:', message); + for (const id in this.connections) { + this.emit('debug', `Broadcast [!!!] — evaluating connection: ${id}`); if (id === origin) continue; this.connections[id]._writeFabric(message); } } - commit () { - const state = new Actor(this.state); - - if (this.observer) { - try { - const patches = manager.generate(this.observer); - if (!patches.length) return; - this.history.push(patches); - this.emit('changes', patches); - // @deprecated - this.emit('patches', patches); - this.emit('commit', { - type: 'FabricCommit', - object: { - delta: patches, - snapshot: state.toGenericMessage().object - } - }); - } catch (exception) { - this.emit('error', `Could not commit: ${exception}`); - } + relayFrom (origin, message, socket = null) { + for (const id in this.connections) { + if (id === origin) continue; + this.connections[id]._writeFabric(message.toBuffer(), socket); } } - relayFrom (origin, message, socket = null) { - // this.emit('debug', `Relaying message from ${origin}: ${message}`); - for (const id in this.peers) { - if (id === origin) continue; - if (!this.connections[id]) { - this.emit('error', `Tried writing to non-existent connection: ${id}`); + subscribe (path) { + + } + + _beginFabricHandshake (client) { + // Start handshake + const vector = ['P2P_SESSION_OFFER', JSON.stringify({ + type: 'P2P_SESSION_OFFER', + actor: { + id: this.identity.id + }, + object: { + challenge: crypto.randomBytes(8).toString('hex'), } + })]; - // this.emit('debug', `Relaying message: ${message}`); - // this.emit('debug', `Relaying to peer: ${id}`); - this.connections[id]._writeFabric(message.toBuffer(), socket); + // Create offer message + const P2P_SESSION_OFFER = Message.fromVector(vector)._setSigner(this.signer).sign(); + const message = P2P_SESSION_OFFER.toBuffer(); + if (this.settings.debug) this.emit('debug', `session_offer ${P2P_SESSION_OFFER} ${message.toString('hex')}`); + + // Send handshake + try { + client.encrypt.write(message); + } catch (exception) { + this.emit('error', `Cannot write to socket: ${exception}`); } + + return this; } + /** + * Open a Fabric connection to the target address and initiate the Fabric Protocol. + * @param {String} target Target address. + */ _connect (target) { + this.emit('debug', `Connecting to target: ${target}`); const url = new URL(`tcp://${target}`); - const socket = net.createConnection(url.port, url.hostname); + const id = url.username; + + if (!url.port) target += `:${P2P_PORT}`; + + const derived = this.identity.key.derive(FABRIC_KEY_DERIVATION_PATH); + this.emit('debug', `Local derived ID: ${JSON.stringify(derived)}`); + + this._registerActor({ name: target }); + this._registerPeer({ identity: id }); + + // Set up the NOISE socket + const socket = net.createConnection(url.port || P2P_PORT, url.hostname); const client = noise({ initiator: true, prologue: Buffer.from(PROLOGUE), @@ -269,82 +338,41 @@

                            Source: types/peer.js

                            }); socket.on('error', (error) => { + this.emit('debug', `--- debug error from _connect() ---`); this.emit('error', `Socket error: ${error}`); }); + socket.on('open', (info) => { + this.emit('debug', `Socket open: ${info}`); + }); + socket.on('close', (info) => { this.emit('debug', `Outbound socket closed: (${target}) ${info}`); + socket._destroyFabric(); + // this._scheduleReconnect(target); }); socket.on('end', (info) => { this.emit('debug', `Socket end: (${target}) ${info}`); + // delete this.connections[target]; }); - // Start stream - client.encrypt.pipe(socket).pipe(client.decrypt); - // TODO: output stream - // client.decrypt.pipe(this.stream); - // Handle trusted Fabric messages client.decrypt.on('data', (data) => { this._handleFabricMessage(data, { name: target }, client); }); - // Start handshake - const vector = ['P2P_SESSION_OFFER', JSON.stringify({ - type: 'P2P_SESSION_OFFER', - actor: { - id: this.identity.id - }, - object: { - challenge: crypto.randomBytes(8).toString('hex'), - } - })]; - - // Create offer message - const P2P_SESSION_OFFER = Message.fromVector(vector)._setSigner(this.signer).sign(); - const message = P2P_SESSION_OFFER.toBuffer(); - this.emit('debug', `session_offer ${P2P_SESSION_OFFER} ${message.toString('hex')}`); - - // Send handshake - try { - client.encrypt.write(message); - } catch (exception) { - this.emit('error', `Cannot write to socket: ${exception}`); - } - - socket._destroyFabric = () => { - if (socket._keepalive) clearInterval(socket._keepalive); - // socket.end(); - }; - - socket._keepalive = setInterval(() => { - const now = (new Date()).toISOString(); - const P2P_PING = Message.fromVector(['GENERIC', JSON.stringify({ - actor: { - id: this.identity.id - }, - created: now, - type: 'P2P_PING', - object: { - created: now - } - })]); + // Start stream + client.encrypt.pipe(socket).pipe(client.decrypt); - try { - client.encrypt.write(P2P_PING.toBuffer()); - } catch (exception) { - this.emit('debug', `Cannot write ping: ${exception}`) - } - }, 60000); + // TODO: output stream + // client.decrypt.pipe(this.stream); - // Map write function - socket._writeFabric = (msg) => { - this._writeFabric(msg, client); - }; + this._registerNOISEClient(target, socket, client); + this._beginFabricHandshake(client); - this.connections[target] = socket; this.emit('connections:open', { + address: target, id: target, url: url }); @@ -359,39 +387,74 @@

                            Source: types/peer.js

                            })]); const announcement = PACKET_PEER_ALIAS.toBuffer(); - this.broadcast(announcement, origin); + // this.emit('debug', `Announcing alias: ${announcement.toString('utf8')}`); + this.broadcast(announcement, origin.name); + } + + _destroyFabric (socket, target) { + if (socket._keepalive) clearInterval(socket._keepalive); + + delete this.connections[target]; + delete this.peers[target]; + + this.emit('connections:close', { + address: target, + name: target + }); } + /** + * Attempt to fill available connection slots with new peers. + * @returns {Peer} Instance of the peer. + */ _fillPeerSlots () { if (this.connections.length >= this.settings.constraints.peers.max) return; const openCount = this.settings.constraints.peers.max - Object.keys(this.connections).length; for (let i = 0; i < openCount; i++) { if (!this.candidates.length) continue; const candidate = this.candidates.shift(); - // this.emit('debug', `Filling peer slot ${i} of ${openCount} (max ${this.settings.constraints.peers.max}) with candidate: ${JSON.stringify(candidate, null, ' ')}`); - + this.emit('debug', `Filling peer slot ${i} of ${openCount} (max ${this.settings.constraints.peers.max}) with candidate: ${JSON.stringify(candidate, null, ' ')}`); + try { this._connect(`${candidate.object.host}:${candidate.object.port}`); } catch (exception) { this.emit('error', `Unable to fill open peer slot ${i}: ${exception}`); } + + // Place the candidate back in the list + this.candidates.push(candidate); } + + return this; } + /** + * Handle a Fabric {@link Message} buffer. + * @param {Buffer} buffer + * @returns {Peer} Instance of the Peer. + */ _handleFabricMessage (buffer, origin = null, socket = null) { - // this.emit('debug', `Peer handler decrypted data: ${buffer.toString('hex')}`); const hash = crypto.createHash('sha256').update(buffer).digest('hex'); const message = Message.fromBuffer(buffer); - // this.emit('debug', `Got Fabric message: ${message}`); + if (this.settings.debug) this.emit('debug', `Got Fabric message: ${message}`); // Have we seen this message before? - if (this._state.content.messages[hash]) { + if (this.messages[hash]) { // this.emit('debug', `Duplicate message: ${hash}`); return; } - this._state.content.messages[hash] = buffer.toString('hex'); - // this.emit('debug', `Stored message: [${hash}] <${buffer.byteLength} bytes> ${buffer.toString('hex')}`); + // Store message for later + this.messages[hash] = buffer.toString('hex'); + + const checksum = crypto.createHash('sha256').update(message.body, 'utf8').digest('hex'); + if (checksum !== message.raw.hash.toString('hex')) throw new Error('Message received with incorrect hash.'); + + // TODO: verify signatures + // const signer = new Signer({ public: message.raw.author }); + // this.emit('debug', `Message signer: ${signer}`); + if (this.settings.debug) this.emit('debug', `Message author: ${message.raw.signature.toString('hex')}`); + if (this.settings.debug) this.emit('debug', `Message signature: ${message.raw.signature.toString('hex')}`); switch (message.type) { default: @@ -400,6 +463,8 @@

                            Source: types/peer.js

                            case 'GenericMessage': case 'PeerMessage': case 'ChatMessage': + // this.emit('debug', `message ${message}`); + // this.emit('debug', `message data: ${message.data}`); // Parse JSON body try { const content = JSON.parse(message.data); @@ -412,28 +477,34 @@

                            Source: types/peer.js

                            } this.commit(); + + return this; } _handleGenericMessage (message, origin = null, socket = null) { - // this.emit('debug', `Generic Message: ${JSON.stringify(message)}`); + if (this.settings.debug) this.emit('debug', `Generic message:\n\tFrom: ${JSON.stringify(origin)}\n\tType: ${message.type}\n\tBody:\n\`\`\`\n${JSON.stringify(message.object, null, ' ')}\n\`\`\``); + + // Lookup the appropriate Actor for the message's origin + const actor = new Actor(origin); + switch (message.type) { default: - this.emit('debug', `Unhandled Generic Message: ${message.type}`); + this.emit('debug', `Unhandled Generic Message: ${message.type} ${JSON.stringify(message, null, ' ')}`); break; case 'P2P_SESSION_OFFER': - this.emit('debug', `Handling session offer: ${JSON.stringify(message.object)}`); - this.emit('debug', `Session offer origin: ${JSON.stringify(origin)}`); - this.emit('debug', `connections: ${JSON.stringify(Object.keys(this.connections))}`); + if (this.settings.debug) this.emit('debug', `Handling session offer: ${JSON.stringify(message.object)}`); + if (this.settings.debug) this.emit('debug', `Session offer origin: ${JSON.stringify(origin)}`); + if (this.settings.debug) this.emit('debug', `connections: ${JSON.stringify(Object.keys(this.connections))}`); // Peer is valid // TODO: remove this assumption (validate above) // TODO: check for existing peer, update instead of replace - this.peers[origin.name] = { + this.peers[origin.name] = new Actor({ id: message.actor.id, name: origin.name, address: origin.name, connections: [ origin.name ] - }; + }); // Emit peer event this.emit('peer', this.peers[origin.name]); @@ -450,11 +521,11 @@

                            Source: types/peer.js

                            const PACKET_SESSION_START = Message.fromVector(vector)._setSigner(this.signer).sign(); const reply = PACKET_SESSION_START.toBuffer(); - this.emit('debug', `session_start ${PACKET_SESSION_START} ${reply.toString('hex')}`); + if (this.settings.debug) this.emit('debug', `session_start ${PACKET_SESSION_START} ${reply.toString('hex')}`); this.connections[origin.name]._writeFabric(reply, socket); break; case 'P2P_SESSION_OPEN': - this.emit('debug', `Handling session open: ${JSON.stringify(message.object)}`); + if (this.settings.debug) this.emit('debug', `Handling session open: ${JSON.stringify(message.object)}`); this.peers[origin.name] = { id: message.object.counterparty, name: origin.name, address: origin }; this.emit('peer', this.peers[origin.name]); break; @@ -480,14 +551,30 @@

                            Source: types/peer.js

                            created: now } })]); + this.connections[origin.name]._writeFabric(P2P_PONG.toBuffer()); break; case 'P2P_PONG': - // TODO: update liveness + // Update the peer's score for succesfully responding to a ping + // TODO: ensure no pong is handled when a ping was not previously sent + const instance = this.state.actors[actor.id] ? this.state.actors[actor.id] : {}; + + this.actors[actor.id].adopt([ + { op: 'replace', path: '/score', value: (instance.score || 0) + 1 } + ]); + + this._state.content.actors[actor.id] = this.actors[actor.id].state; + this.commit(); + + if (this.settings.debug) this.emit('debug', `Received pong: ${JSON.stringify(message, null, ' ')}`); + this.emit('state', this.state); + break; case 'P2P_PEER_ALIAS': this.emit('debug', `peer_alias ${origin.name} <Generic>${JSON.stringify(message.object || '')}`); this.connections[origin.name]._alias = message.object.name; + // const alias = Message.fromVector(['PeerAlias', JSON.stringify(message)]); + // this.relayFrom(origin.name, alias); break; case 'P2P_PEER_ANNOUNCE': this.emit('debug', `peer_announce <Generic>${JSON.stringify(message.object || '')}`); @@ -500,25 +587,48 @@

                            Source: types/peer.js

                            break; case 'P2P_DOCUMENT_PUBLISH': break; + case 'CONTRACT_PUBLISH': + // TODO: reject and punish mis-behaving peers + this.emit('debug', `Handling peer contract publish: ${JSON.stringify(message.object)}`); + this._registerContract(message.object); + break; + case 'CONTRACT_MESSAGE': + // TODO: reject and punish mis-behaving peers + if (this.settings.debug) this.emit('debug', `Handling contract message: ${JSON.stringify(message.object)}`); + if (this.settings.debug) this.emit('debug', `Contract state: ${JSON.stringify(this.state.contracts[message.object.contract])}`); + manager.applyPatch(this._state.content.contracts[message.object.contract], message.object.ops); + this.commit(); + break; } } _handleNOISEHandshake (localPrivateKey, localPublicKey, remotePublicKey) { - this.emit('debug', `Peer encrypt handshake using local key: ${localPrivateKey.toString('hex')}`); - this.emit('debug', `Peer encrypt handshake using local public key: ${localPublicKey.toString('hex')}`); - this.emit('debug', `Peer encrypt handshake with remote public key: ${remotePublicKey.toString('hex')}`); + // const counterparty = new Identity({ public: remotePublicKey.toString('hex') }); + this.emit('debug', `Peer transport handshake using local key: ${localPrivateKey.toString('hex')}`); + this.emit('debug', `Peer transport handshake using local public key: ${localPublicKey.toString('hex')}`); + this.emit('debug', `Peer transport handshake with remote public key: ${remotePublicKey.toString('hex')}`); + // this.emit('debug', `Peer transport handshake with remote identity: ${counterparty.id}`); } _NOISESocketHandler (socket) { const target = `${socket.remoteAddress}:${socket.remotePort}`; const url = `tcp://${target}`; + + // Store a unique actor for this inbound connection + this._registerActor({ name: target }); + + // this.emit('debug', `Local NOISE key: ${JSON.stringify(this.identity.key, null, ' ')}`); + const derived = this.identity.key.derive(FABRIC_KEY_DERIVATION_PATH); + this.emit('debug', `Derived NOISE key: ${derived.private.toString('hex')}`); + + // Create NOISE handler const handler = noise({ prologue: Buffer.from(PROLOGUE), - // privateKey: this.identity.key.private, + // privateKey: derived.private.toString('hex'), verify: this._verifyNOISE.bind(this) }); - handler.encrypt.pipe(socket).pipe(handler.decrypt); + // Set up NOISE event handlers handler.encrypt.on('handshake', this._handleNOISEHandshake.bind(this)); handler.encrypt.on('error', (error) => { this.emit('error', `NOISE encrypt error: ${error}`); @@ -526,6 +636,9 @@

                            Source: types/peer.js

                            handler.encrypt.on('end', (data) => { this.emit('debug', `Peer encrypt end: ${data}`); + // socket.destroy(); + delete this.connections[target]; + this.peers[target].status = 'disconnected'; }); handler.decrypt.on('error', (error) => { @@ -537,7 +650,9 @@

                            Source: types/peer.js

                            }); handler.decrypt.on('end', (data) => { - this.emit('debug', `Peer decrypt end: ${data}`); + this.emit('debug', `Peer decrypt end: (${target}) ${data}`); + this.emit('debug', `Connections: ${Object.keys(this.connections)}`); + socket._destroyFabric(); }); handler.decrypt.on('data', (data) => { @@ -545,8 +660,7 @@

                            Source: types/peer.js

                            }); socket._destroyFabric = () => { - if (socket._keepalive) clearInterval(socket._keepalive); - socket.end(); + this._destroyFabric(socket, target); }; socket._writeFabric = (msg) => { @@ -556,12 +670,145 @@

                            Source: types/peer.js

                            // Store socket in collection this.connections[target] = socket; + // Begin NOISE stream + handler.encrypt.pipe(socket).pipe(handler.decrypt); + this.emit('connections:open', { id: target, url: url }); } + _publishDocument (hash, rate = 0) { + this._state.content.documents[hash] = document; + + this.commit(); + + const PACKET_DOCUMENT_PUBLISH = Message.fromVector(['P2P_DOCUMENT_PUBLISH', JSON.stringify({ + type: 'P2P_DOCUMENT_PUBLISH', + object: { + hash: hash, + rate: rate + } + })]); + + const message = PACKET_DOCUMENT_PUBLISH.toBuffer(); + if (this.settings.debug) this.emit('debug', `Broadcasting document publish: ${message.toString('utf8')}`); + this.broadcast(message); + } + + _registerActor (object) { + this.emit('debug', `Registering actor: ${JSON.stringify(object, null, ' ')}`); + const actor = new Actor(object); + + /* actor.adopt([ + { op: 'replace', path: '/status', value: 'REGISTERED' } + ]); */ + + if (this.actors[actor.id]) return this; + + this.actors[actor.id] = actor; + this.commit(); + this.emit('actorset', this.actors); + + return this; + } + + _registerContract (object) { + this.emit('debug', `Registering contract: ${JSON.stringify(object, null, ' ')}`); + const actor = new Actor(object); + + if (this.contracts[actor.id]) return this; + + this.contracts[actor.id] = actor; + this._state.content.contracts[actor.id] = object.state; + + this.commit(); + this.emit('contractset', this.contracts); + + return this; + } + + _registerNOISEClient (name, socket, client) { + // Assign socket properties + // Failure counter + socket._failureCount = 0; + socket._lastMessage = null; + socket._messageLog = []; + + // Enable keepalive + socket._keepalive = setInterval(() => { + const now = (new Date()).toISOString(); + const P2P_PING = Message.fromVector(['GENERIC', JSON.stringify({ + actor: { + id: this.identity.id + }, + created: now, + type: 'P2P_PING', + object: { + created: now + } + })]); + + try { + client.encrypt.write(P2P_PING.toBuffer()); + } catch (exception) { + this.emit('debug', `Cannot write ping: ${exception}`) + } + }, 60000); + + // TODO: reconcile APIs for these methods + // Map destroy function + socket._destroyFabric = () => { + this._destroyFabric(socket, name); + }; + + // Map write function + socket._writeFabric = (msg) => { + this._writeFabric(msg, client); + }; + + this.connections[name] = socket; + + return this; + } + + _registerPeer (data) { + const peer = new Actor({ + type: 'Peer', + data: data + }); + + if (this.peers[peer.id]) return this; + + this.peers[peer.id] = peer; + + return this; + } + + _scheduleReconnect (target, when = 250) { + this.emit('debug', `Scheduled reconnect to ${target} in ${when} milliseconds...`); + const reconnect = setTimeout(() => { + this._connect(target) + }, when); + + this.emit('debug', `Scheduled: ${reconnect}`); + } + + _selectBestPeerCandidate () { + const candidates = []; + + for (const id of Object.entries(this.peers)) { + candidates.push(id); + } + + candidates.sort((a, b) => { + return (a.score > b.score) ? 1 : 0; + }); + + return candidates[0] || null; + } + _verifyNOISE (localPrivateKey, localPublicKey, remotePublicKey, done) { // Is the message valid? if (1 === 1) { @@ -573,7 +820,7 @@

                            Source: types/peer.js

                            _writeFabric (msg, stream) { const hash = crypto.createHash('sha256').update(msg).digest('hex'); - this._state.content.messages[hash] = msg.toString('hex'); + this.messages[hash] = msg.toString('hex'); this.commit(); if (stream) stream.encrypt.write(msg); } @@ -583,52 +830,10 @@

                            Source: types/peer.js

                            */ async start () { let address = null; - this.emit('log', 'Peer starting...'); - if (this.settings.upnp) { - // TODO: convert callbacks to promises - this.emit('log', 'UPNP starting...'); - this.upnp = upnp.createClient(); - this.upnp.portMapping({ - description: '@fabric/core#playnet', - public: this.settings.port, - private: this.settings.port, - ttl: 10 - }, (error) => { - if (error) { - this.emit('warning', 'Could not create UPNP mapping. Other nodes may fail when connecting to this node.'); - } else { - this.upnp.getMappings((error, results) => { - if (!results || !results.length) return; - const mapping = results.find((x) => x.private.port === this.settings.port ); - // this.emit('debug', `UPNP mappings: ${JSON.stringify(results, null, ' ')}`); - // this.emit('debug', `Our rule: ${JSON.stringify(mapping, null, ' ')}`); - - this.upnp.externalIp((error, ip) => { - if (error) { - this.emit('warning', `Could not get external IP: ${error}`); - } else { - // this.emit('debug', `UPNP external: ${JSON.stringify(ip, null, ' ')}`); - this._externalIP = ip; - this.emit('upnp', { - host: ip, - port: this.settings.port - }); - } - }); - }); - } - }); - } - - this.emit('log', 'Wallet starting...'); - - try { - await this.wallet.start(); - } catch (exception) { - this.emit('error', `Could not start wallet: ${exception}`); - } + // Register self + this._registerActor({ name: `${this.interface}:${this.port}` }); if (this.settings.listen) { this.emit('log', 'Listener starting...'); @@ -648,18 +853,39 @@

                            Source: types/peer.js

                            } } + if (this.settings.debug) this.emit('debug', `Observing state...`); + try { this.observer = manager.observe(this._state.content); } catch (exception) { this.emit('error', `Could not observe state: ${exception}`); } + await this._startHeart(); + + if (this.settings.debug) this.emit('debug', `Peer ready! State: ${JSON.stringify(this.state, null, ' ')}`); + this.emit('ready', { id: this.id, address: address, pubkey: this.key.pubkey }); + if (this.settings.debug) this.emit('debug', `Peer started!`); + + /* + const PACKET_PEER_ANNOUNCE = Message.fromVector(['P2P_PEER_ANNOUNCE', JSON.stringify({ + type: 'P2P_PEER_ANNOUNCE', + object: { + host: this._externalIP, + port: this.settings.port + } + })])._setSigner(this.signer).sign(); + const announcement = PACKET_PEER_ANNOUNCE.toBuffer(); + // this.emit('debug', `Announcing peer: ${announcement.toString('utf8')}`); + this.connections[origin.name]._writeFabric(announcement, socket); + */ + return this; } @@ -669,16 +895,14 @@

                            Source: types/peer.js

                            async stop () { // Alert listeners this.emit('log', 'Peer stopping...'); - this._state.status = 'STOPPING'; - if (this.settings.upnp && this.upnp) { - this.upnp.close(); - } + // Stop the heart + if (this._heart) clearInterval(this._heart); + this.emit('debug', 'Closing all connections...'); for (const id in this.connections) { - this.connections[id]._destroyFabric(); - delete this.connections[id]; + this.connections[id].destroy(); } const terminator = async () => { @@ -691,21 +915,25 @@

                            Source: types/peer.js

                            }); } + this.emit('debug', 'Closing network...'); await terminator(); this._state.status = 'STOPPED'; this.commit(); + this.emit('log', 'Peer stopped!'); + return this; } async _setState (value) { if (!value) return new Error('You must provide a State to set the value to.'); this._state.content = value; - return this.state.state; + return this.state; } _disconnect (address) { + this.emit('debug', `Disconnect request for address: ${address}`); if (!this.connections[address]) return false; // Halt any heartbeat @@ -764,198 +992,6 @@

                            Source: types/peer.js

                            this.broadcast(message); } - // TODO: delete this function - async _handleMessage (packet) { - if (!packet) return false; - - // Constants - const self = this; - const message = packet.message; - const origin = packet.origin; - - // Variables - let relay = false; - let response = null; - - this._updateLiveness(origin); - - if (!message) return this.emit('error', `Hard failure: ${packet}`); - // TODO: replicate Collection logic to new Peer handlers - if (this.messages.has(message.id)) { - // this.emit('debug', `Received duplicate message ${message.id} from [${origin}] in packet: ${JSON.stringify(packet, null, ' ')}`); - return false; - } else { - this.memory[message.id] = message; - this.messages.add(message.id); - } - - this.emit('log', `Evaluting message with purported type "${message.type}":`); - - // Build a response to various message types - switch (message.type) { - case 'Generic': - relay = true; - break; - case 'Ping': - response = Message.fromVector(['Pong', message.id]); - break; - case 'Pong': - // self.emit('message', `Received Pong: ${message}`); - break; - case 'StartChain': - break; - case 'GenericMessage': - // console.warn('[FABRIC:PEER]', 'Received Generic Message:', message.data); - relay = true; - break; - case 'IdentityRequest': - console.log('[FABRIC:PEER]', 'Peer sent IdentityRequest. Responding with IdentityResponse (node id)...', self.id); - response = Message.fromVector(['IdentityResponse', self.id]); - break; - case 'IdentityResponse': - if (!self.peers[message.data]) { - let peer = { - id: message.data, - address: packet.origin - }; - - // TODO: remove in favor of StartSession - // Why? Duplicate "peer" event is sent within _registerPeer - // Try to register peer... - /* try { - self._registerPeer(peer); - } catch (exception) { - self.emit('error', `Could not register peer ${message.data} because: ${exception}`); - } */ - } - - response = Message.fromVector(['StateRoot', JSON.stringify(self.state)]); - break; - case 'DocumentPublish': - this.emit('log', `Document published from peer: ${message.data}`); - this.emit('DocumentPublish', message.data); - break; - case 'DocumentRequest': - this.emit('DocumentRequest', message.data); - break; - case 'BlockCandidate': - break; - case 'PeerCandidate': - let candidate = null; - - try { - candidate = JSON.parse(message.data); - } catch (exception) { - console.error('[FABRIC:PEER]', `[@ID:$${self.id}]`, 'Could not parse PeerCandidate message:', message.data, exception); - } - - self.emit('peer:candidate', candidate); - break; - case 'PeerMessage': - // console.error('[FABRIC:PEER]', `[@ID:$${self.id}]`, `Received "PeerMessage" from ${packet.origin} on socket:`, message.raw); - // console.error('[FABRIC:PEER]', `[@ID:$${self.id}]`, `Packet origin:`, packet.origin); - // TODO: use packet's peer ID, not socket address - // Likely need to track connection? - self.relayFrom(packet.origin, message); - break; - case 'StartSession': - if (self.settings.verbosity >= 6) console.warn('[AUDIT]', '[FABRIC:PEER]', `[0x${self.id}]`, 'Received "StartSession" message on socket:', message.raw); - let session = null; - - try { - session = JSON.parse(message.data.toString('utf8')); - } catch (exception) { - console.error('[FABRIC:PEER]', 'Session body could not be parsed:', exception); - } - - if (self.settings.verbosity >= 5) console.log('[FABRIC:PEER]', 'Proposed session:', session); - - // TODO: avoid using JSON in overall protocol - // TODO: validate signature - let valid = true; - // TODO: restore session identity - if (valid && session/* && session.identity */) { - if (self.settings.verbosity >= 6) console.log('[AUDIT]', 'Session is valid...'); - - let peer = { - id: session.identity, - address: packet.origin, - advertise: `${self.pubkeyhash}@${self.public.ip}:${self.public.port}`, - status: 'unfunded' - }; - - if (self.settings.verbosity >= 5) console.log('[FABRIC:PEER]', 'Peer to register:', peer); - - // TODO: document peer registration process - self._registerPeer(peer); - - // TODO: use message type for next phase of session (i.e., NOISE) - response = Message.fromVector(['StartSession', { identity: self.id }]); - if (self.settings.verbosity >= 6) console.log('[AUDIT]', 'Will send response:', response); - } - - break; - case 'StateRoot': - if (self.settings.verbosity >= 5) console.log('[AUDIT]', 'Message was a state root:', message.data); - - // TODO: test protocol flow (i.e., understand StateRoot) - console.log('[AUDIT]', 'Message was a state root:', message.raw, message.data); - - try { - const state = JSON.parse(message.data); - self.emit('state', state); - response = { - 'type': 'Receipt', - 'data': state - }; - } catch (E) { - console.error('[FABRIC:PEER]', 'Could not parse StateRoot:', E); - } - break; - case 'StateChange': - console.log('message was a state change:', message.data); - break; - case P2P_BASE_MESSAGE: - self._handleBasePacket(packet); - break; - case P2P_ROOT: - response = Message.fromVector([P2P_STATE_COMMITTMENT, self.state]); - self.log('type was ROOT, sending state root:', response); - self.log('type was ROOT, state was:', self.state); - break; - case P2P_INSTRUCTION: - // TODO: use Fabric.Script / Fabric.Machine - let stack = message.data.split(' '); - switch (stack[1]) { - case 'SIGN': - let signature = self.key._sign(stack[0]); - let buffer = Buffer.from(signature); - let script = [buffer.toString('hex'), 'CHECKSIG'].join(' '); - - response = Message.fromVector([P2P_INSTRUCTION, script]); - break; - default: - console.log('[PEER]', `unhandled peer instruction "${stack[1]}"`); - break; - } - - break; - default: - console.error('[PEER]', `unhandled message type "${message.type}"`); - self.emit('error', `Unhandled message type "${message.type}"`); - break; - } - - // Emit for listeners - // self.emit('message', message); - - if (relay) { - self.relayFrom(origin, message); - } - - return response; - } - /** * Start listening for connections. * @return {Peer} Chainable method. @@ -966,9 +1002,9 @@

                            Source: types/peer.js

                            if (error) return reject(error); const details = this.server.address(); - const address = `tcp://${details.address}:${details.port}`; + const address = `${details.address}:${details.port}`; - this.emit('log', `Now listening on ${address} [!!!]`); + this.emit('log', `Now listening on tcp://${address} [!!!]`); return resolve(address); }); @@ -992,44 +1028,32 @@

                            Home

                            Classes

                            • Actor
                            • -
                            • Aggregator
                            • -
                            • App
                            • Bitcoin
                            • +
                            • CLI
                            • Chain
                            • Channel
                            • Circuit
                            • -
                            • CLI
                            • Collection
                            • -
                            • Compiler
                            • -
                            • Consensus
                            • -
                            • Entity
                            • Environment
                            • -
                            • Exchange
                            • Fabric
                            • Federation
                            • Filesystem
                            • -
                            • Hash256
                            • HKDF
                            • HTTPServer
                            • +
                            • Hash256
                            • Identity
                            • Interface
                            • Key
                            • -
                            • Keystore
                            • Ledger
                            • Lightning
                            • Logger
                            • Machine
                            • -
                            • Mempool
                            • Message
                            • -
                            • Node
                            • -
                            • Oracle
                            • -
                            • Path
                            • Peer
                            • Reader
                            • Redis
                            • Remote
                            • Resource
                            • -
                            • Router
                            • Scribe
                            • Script
                            • Service
                            • @@ -1040,9 +1064,8 @@

                              Classes

                            • Stash
                            • State
                            • Store
                            • -
                            • Swap
                            • Swarm
                            • -
                            • Transition
                            • +
                            • Token
                            • Tree
                            • Value
                            • Vector
                            • diff --git a/docs/types_reader.js.html b/docs/types_reader.js.html index ab8f944cf..63ec04cb4 100644 --- a/docs/types_reader.js.html +++ b/docs/types_reader.js.html @@ -195,44 +195,32 @@

                              Home

                              Classes

                              • Actor
                              • -
                              • Aggregator
                              • -
                              • App
                              • Bitcoin
                              • +
                              • CLI
                              • Chain
                              • Channel
                              • Circuit
                              • -
                              • CLI
                              • Collection
                              • -
                              • Compiler
                              • -
                              • Consensus
                              • -
                              • Entity
                              • Environment
                              • -
                              • Exchange
                              • Fabric
                              • Federation
                              • Filesystem
                              • -
                              • Hash256
                              • HKDF
                              • HTTPServer
                              • +
                              • Hash256
                              • Identity
                              • Interface
                              • Key
                              • -
                              • Keystore
                              • Ledger
                              • Lightning
                              • Logger
                              • Machine
                              • -
                              • Mempool
                              • Message
                              • -
                              • Node
                              • -
                              • Oracle
                              • -
                              • Path
                              • Peer
                              • Reader
                              • Redis
                              • Remote
                              • Resource
                              • -
                              • Router
                              • Scribe
                              • Script
                              • Service
                              • @@ -243,9 +231,8 @@

                                Classes

                              • Stash
                              • State
                              • Store
                              • -
                              • Swap
                              • Swarm
                              • -
                              • Transition
                              • +
                              • Token
                              • Tree
                              • Value
                              • Vector
                              • diff --git a/docs/types_remote.js.html b/docs/types_remote.js.html index bc9e128ee..506ac8b47 100644 --- a/docs/types_remote.js.html +++ b/docs/types_remote.js.html @@ -74,11 +74,13 @@

                                Source: types/remote.js

                                entropy: Math.random(), macaroon: null, secure: true, + state: { + status: 'PAUSED' + }, host: 'hub.fabric.pub', port: 443 }, config); - this.host = this.settings.host || this.settings.authority; this.secure = this.settings.secure; this.socket = null; @@ -99,6 +101,22 @@

                                Source: types/remote.js

                                return this; } + set host (value) { + if (typeof value !== 'string') throw new Error('Host must be a string.'); + this.settings.host = value; + return this.settings.host; + } + + get host () { + return this.settings.host; + } + + set port (value) { + if (!Number.isInteger(value)) throw new Error('Port must be an integer.'); + this.settings.port = value; + return this.settings.port; + } + get port () { return this.settings.port; } @@ -345,6 +363,7 @@

                                Source: types/remote.js

                                result = await response.json(); } catch (E) { console.error('[REMOTE]', 'Could not parse JSON:', E); + result = await response.text(); } break; default: @@ -356,9 +375,9 @@

                                Source: types/remote.js

                                if (this.settings.verbosity >= 4) console.warn('[FABRIC:REMOTE]', 'Unmanaged HTTP status code:', response.status); try { - result = response.json(); + result = await response.json(); } catch (exception) { - result = response.text(); + result = await response.text(); } } break; @@ -469,6 +488,7 @@

                                Source: types/remote.js

                                } async _SEARCH (key, params) { + console.debug('[FABRIC:CORE]', '_SEARCH:', key, params); return this.request('search', key, params); } } @@ -486,44 +506,32 @@

                                Home

                                Classes

                                • Actor
                                • -
                                • Aggregator
                                • -
                                • App
                                • Bitcoin
                                • +
                                • CLI
                                • Chain
                                • Channel
                                • Circuit
                                • -
                                • CLI
                                • Collection
                                • -
                                • Compiler
                                • -
                                • Consensus
                                • -
                                • Entity
                                • Environment
                                • -
                                • Exchange
                                • Fabric
                                • Federation
                                • Filesystem
                                • -
                                • Hash256
                                • HKDF
                                • HTTPServer
                                • +
                                • Hash256
                                • Identity
                                • Interface
                                • Key
                                • -
                                • Keystore
                                • Ledger
                                • Lightning
                                • Logger
                                • Machine
                                • -
                                • Mempool
                                • Message
                                • -
                                • Node
                                • -
                                • Oracle
                                • -
                                • Path
                                • Peer
                                • Reader
                                • Redis
                                • Remote
                                • Resource
                                • -
                                • Router
                                • Scribe
                                • Script
                                • Service
                                • @@ -534,9 +542,8 @@

                                  Classes

                                • Stash
                                • State
                                • Store
                                • -
                                • Swap
                                • Swarm
                                • -
                                • Transition
                                • +
                                • Token
                                • Tree
                                • Value
                                • Vector
                                • diff --git a/docs/types_resource.js.html b/docs/types_resource.js.html index 29596308d..238cea8d4 100644 --- a/docs/types_resource.js.html +++ b/docs/types_resource.js.html @@ -148,44 +148,32 @@

                                  Home

                                  Classes

                                  • Actor
                                  • -
                                  • Aggregator
                                  • -
                                  • App
                                  • Bitcoin
                                  • +
                                  • CLI
                                  • Chain
                                  • Channel
                                  • Circuit
                                  • -
                                  • CLI
                                  • Collection
                                  • -
                                  • Compiler
                                  • -
                                  • Consensus
                                  • -
                                  • Entity
                                  • Environment
                                  • -
                                  • Exchange
                                  • Fabric
                                  • Federation
                                  • Filesystem
                                  • -
                                  • Hash256
                                  • HKDF
                                  • HTTPServer
                                  • +
                                  • Hash256
                                  • Identity
                                  • Interface
                                  • Key
                                  • -
                                  • Keystore
                                  • Ledger
                                  • Lightning
                                  • Logger
                                  • Machine
                                  • -
                                  • Mempool
                                  • Message
                                  • -
                                  • Node
                                  • -
                                  • Oracle
                                  • -
                                  • Path
                                  • Peer
                                  • Reader
                                  • Redis
                                  • Remote
                                  • Resource
                                  • -
                                  • Router
                                  • Scribe
                                  • Script
                                  • Service
                                  • @@ -196,9 +184,8 @@

                                    Classes

                                  • Stash
                                  • State
                                  • Store
                                  • -
                                  • Swap
                                  • Swarm
                                  • -
                                  • Transition
                                  • +
                                  • Token
                                  • Tree
                                  • Value
                                  • Vector
                                  • diff --git a/docs/types_router.js.html b/docs/types_router.js.html index 6bb308359..29097920f 100644 --- a/docs/types_router.js.html +++ b/docs/types_router.js.html @@ -39,15 +39,7 @@

                                    Source: types/router.js

                                    // Current code is specific to @fabric/doorman — should be a general- // purpose Router, not for strings and triggers in chat messages. -/** - * Process incoming messages. - * @extends Scribe - */ class Router extends Scribe { - /** - * Maintains a list of triggers ("commands") and their behaviors. - * @param {Object} map Map of command names => behaviors. - */ constructor (config) { super(config); @@ -131,44 +123,32 @@

                                    Home

                                    Classes

                                    • Actor
                                    • -
                                    • Aggregator
                                    • -
                                    • App
                                    • Bitcoin
                                    • +
                                    • CLI
                                    • Chain
                                    • Channel
                                    • Circuit
                                    • -
                                    • CLI
                                    • Collection
                                    • -
                                    • Compiler
                                    • -
                                    • Consensus
                                    • -
                                    • Entity
                                    • Environment
                                    • -
                                    • Exchange
                                    • Fabric
                                    • Federation
                                    • Filesystem
                                    • -
                                    • Hash256
                                    • HKDF
                                    • HTTPServer
                                    • +
                                    • Hash256
                                    • Identity
                                    • Interface
                                    • Key
                                    • -
                                    • Keystore
                                    • Ledger
                                    • Lightning
                                    • Logger
                                    • Machine
                                    • -
                                    • Mempool
                                    • Message
                                    • -
                                    • Node
                                    • -
                                    • Oracle
                                    • -
                                    • Path
                                    • Peer
                                    • Reader
                                    • Redis
                                    • Remote
                                    • Resource
                                    • -
                                    • Router
                                    • Scribe
                                    • Script
                                    • Service
                                    • @@ -179,9 +159,8 @@

                                      Classes

                                    • Stash
                                    • State
                                    • Store
                                    • -
                                    • Swap
                                    • Swarm
                                    • -
                                    • Transition
                                    • +
                                    • Token
                                    • Tree
                                    • Value
                                    • Vector
                                    • diff --git a/docs/types_scribe.js.html b/docs/types_scribe.js.html index 489faee89..f0f42265e 100644 --- a/docs/types_scribe.js.html +++ b/docs/types_scribe.js.html @@ -38,17 +38,7 @@

                                      Source: types/scribe.js

                                      // Fabric Components const State = require('./state'); -/** - * Simple tag-based recordkeeper. - * @extends State - * @property {Object} config Current configuration. - */ class Scribe extends State { - /** - * The "Scribe" is a simple tag-based recordkeeper. - * @param {Object} config General configuration object. - * @param {Boolean} config.verbose Should the Scribe be noisy? - */ constructor (config = {}) { super(config); @@ -212,44 +202,32 @@

                                      Home

                                      Classes

                                      • Actor
                                      • -
                                      • Aggregator
                                      • -
                                      • App
                                      • Bitcoin
                                      • +
                                      • CLI
                                      • Chain
                                      • Channel
                                      • Circuit
                                      • -
                                      • CLI
                                      • Collection
                                      • -
                                      • Compiler
                                      • -
                                      • Consensus
                                      • -
                                      • Entity
                                      • Environment
                                      • -
                                      • Exchange
                                      • Fabric
                                      • Federation
                                      • Filesystem
                                      • -
                                      • Hash256
                                      • HKDF
                                      • HTTPServer
                                      • +
                                      • Hash256
                                      • Identity
                                      • Interface
                                      • Key
                                      • -
                                      • Keystore
                                      • Ledger
                                      • Lightning
                                      • Logger
                                      • Machine
                                      • -
                                      • Mempool
                                      • Message
                                      • -
                                      • Node
                                      • -
                                      • Oracle
                                      • -
                                      • Path
                                      • Peer
                                      • Reader
                                      • Redis
                                      • Remote
                                      • Resource
                                      • -
                                      • Router
                                      • Scribe
                                      • Script
                                      • Service
                                      • @@ -260,9 +238,8 @@

                                        Classes

                                      • Stash
                                      • State
                                      • Store
                                      • -
                                      • Swap
                                      • Swarm
                                      • -
                                      • Transition
                                      • +
                                      • Token
                                      • Tree
                                      • Value
                                      • Vector
                                      • diff --git a/docs/types_script.js.html b/docs/types_script.js.html index 1126ff1a3..baf89ae0f 100644 --- a/docs/types_script.js.html +++ b/docs/types_script.js.html @@ -78,44 +78,32 @@

                                        Home

                                        Classes

                                        • Actor
                                        • -
                                        • Aggregator
                                        • -
                                        • App
                                        • Bitcoin
                                        • +
                                        • CLI
                                        • Chain
                                        • Channel
                                        • Circuit
                                        • -
                                        • CLI
                                        • Collection
                                        • -
                                        • Compiler
                                        • -
                                        • Consensus
                                        • -
                                        • Entity
                                        • Environment
                                        • -
                                        • Exchange
                                        • Fabric
                                        • Federation
                                        • Filesystem
                                        • -
                                        • Hash256
                                        • HKDF
                                        • HTTPServer
                                        • +
                                        • Hash256
                                        • Identity
                                        • Interface
                                        • Key
                                        • -
                                        • Keystore
                                        • Ledger
                                        • Lightning
                                        • Logger
                                        • Machine
                                        • -
                                        • Mempool
                                        • Message
                                        • -
                                        • Node
                                        • -
                                        • Oracle
                                        • -
                                        • Path
                                        • Peer
                                        • Reader
                                        • Redis
                                        • Remote
                                        • Resource
                                        • -
                                        • Router
                                        • Scribe
                                        • Script
                                        • Service
                                        • @@ -126,9 +114,8 @@

                                          Classes

                                        • Stash
                                        • State
                                        • Store
                                        • -
                                        • Swap
                                        • Swarm
                                        • -
                                        • Transition
                                        • +
                                        • Token
                                        • Tree
                                        • Value
                                        • Vector
                                        • diff --git a/docs/types_service.js.html b/docs/types_service.js.html index f25a01205..59dfe4f9c 100644 --- a/docs/types_service.js.html +++ b/docs/types_service.js.html @@ -51,12 +51,13 @@

                                          Source: types/service.js

                                          // Fabric Types const Actor = require('./actor'); const Collection = require('./collection'); -const Identity = require('./identity'); -const Resource = require('./resource'); const Entity = require('./entity'); +const Filesystem = require('./filesystem'); const Hash256 = require('./hash256'); +const Identity = require('./identity'); const Key = require('./key'); const Message = require('./message'); +const Resource = require('./resource'); const Store = require('./store'); /** @@ -74,18 +75,22 @@

                                          Source: types/service.js

                                          class Service extends Actor { /** * Create an instance of a Service. - * @param {Object} settings Configuration for this service. - * @param {Boolean} [settings.networking=true] Whether or not to connect to the network. - * @param {Object} [settings.@data] Internal data to assign. + * @param {Object} [settings] Configuration for this service. + * @param {Boolean} [settings.networking=true] Whether or not to connect to the network. + * @param {Object} [settings.frequency] Interval frequency in hertz. + * @param {Object} [settings.state] Initial state to assign. */ constructor (settings = {}) { // Initialize Scribe, our logging tool super(settings); + this.name = this.constructor.name; + // Configure (with defaults) this.settings = merge({ name: 'Service', path: './stores/service', + frequency: 0.0133333334, // Hz networking: true, persistent: false, constraints: { @@ -94,6 +99,9 @@

                                          Source: types/service.js

                                          max: 67108864 } }, + fs: { + path: `./stores/fabric-service-${this.name}` + }, state: { ...super.state, actors: {}, // TODO: schema @@ -111,7 +119,7 @@

                                          Source: types/service.js

                                          messages: {}, members: {} } */ - }, this.settings, settings); + }, settings); // Reserve a place for ourselves this.agent = null; @@ -135,6 +143,7 @@

                                          Source: types/service.js

                                          // Error: Not implemented yet this.key = new Key(this.settings.key); this.identity = new Identity(this.settings.key); + this.fs = new Filesystem(this.settings.fs); if (this.settings.persistent) { try { @@ -144,6 +153,8 @@

                                          Source: types/service.js

                                          } } + this._clock = 0; + // set local state to whatever configuration supplies... /* this.state = Object.assign({ messages: {} // always define a list of messages for Fabric services @@ -184,13 +195,17 @@

                                          Source: types/service.js

                                          } get clock () { - return parseInt(this._state.clock); + return parseInt(this._clock); } get heartbeat () { return this._heart; } + get interval () { + return 1000 / this.settings.frequency; + } + get status () { return this._state.status; } @@ -330,7 +345,7 @@

                                          Source: types/service.js

                                          /** * Retrieve a key from the {@link State}. * @param {Path} path Key to retrieve. - * @returns {Mixed} + * @returns {Mixed} Returns the target value if found, otherwise null. */ get (path = '') { let result = null; @@ -353,6 +368,12 @@

                                          Source: types/service.js

                                          return result; } + // Synchronize with any external sources + sync () { + if (!this._sources) this._sources = []; + return this; + } + /** * Explicitly trust all events from a known source. * @param {EventEmitter} source Emitter of events. @@ -414,13 +435,13 @@

                                          Source: types/service.js

                                          self.emit('debug', `[FABRIC:SERVICE] Source "${name}" emitted channel: ${JSON.stringify(channel, null, ' ')}`); }), _handleCommit: source.on('commit', async function (commit) { - self.emit('log', `[FABRIC:SERVICE] Source "${name}" committed: ${JSON.stringify(commit, null, ' ')}`); + self.emit('debug', `[FABRIC:SERVICE] Source "${name}" committed: ${JSON.stringify(commit, null, ' ')}`); }), _handleError: source.on('error', async function _handleTrustedError (error) { self.emit('debug', `[FABRIC:SERVICE] Source "${name}" emitted error: ${error}`); }), _handleLog: source.on('log', async function _handleTrustedLog (log) { - self.emit('log', `[FABRIC:SERVICE] Source "${name}" emitted log: ${log}`); + if (self.settings.debug) self.emit('log', `[FABRIC:SERVICE] Source "${name}" emitted log: ${log}`); }), _handleMessage: source.on('message', async function (message) { self.emit('debug', `[FABRIC:SERVICE] Source "${name}" emitted message: ${JSON.stringify(message.toObject ? message.toObject() : message, null, ' ')}`); @@ -438,7 +459,7 @@

                                          Source: types/service.js

                                          self.alert(`[FABRIC:SERVICE] New ${name} chaintip: ${hash}`); }), _handleWarning: source.on('warning', async function _handleTrustedWarning (warning) { - self.emit('warning', `[FABRIC:SERVICE] Source "${name}" emitted warning: ${warning}`); + if (self.settings?.verbosity >= 2) self.emit('warning', `[FABRIC:SERVICE] Source "${name}" emitted warning: ${warning}`); }) }; } @@ -510,10 +531,21 @@

                                          Source: types/service.js

                                          return true; } + /** + * Bind a method to an event, with current state as the immutable context. + * @param {String} event Name of the event upon which to execute `method` as a function. + * @param {Function} method Function to execute when named {@link Event} `event` is encountered. + * @returns {EventEmitter} Instance of EventEmitter. + */ + when (event, method) { + return this.on(event, method.call(this.state)); + } + _defineResource (name, definition) { const resource = Object.assign({ name }, definition); this.resources[name] = new Resource(resource); this.emit('resource', this.resources[name]); + return this.resources[name]; } _handleTrustedDebug (message) { @@ -913,41 +945,12 @@

                                          Source: types/service.js

                                          commit () { // this.emit('debug', `[FABRIC:SERVICE] Committing ${OP_TRACE()}`); - - const self = this; - const ops = []; - - // assemble all necessary info, emit Snapshot regardless of storage status - try { - ops.push({ type: 'put', key: 'snapshot', value: self.state }); - - /* this.emit('debug', `Commit Template: ${JSON.stringify({ - '@data': self.state, - '@from': 'COMMIT', - '@type': 'Snapshot' - }, null, ' ')}`); */ - } catch (E) { - console.error('Error saving state:', self.state); - console.error('Could not commit to state:', E); - } - - if (this.settings.persistent) { - // TODO: add robust + convenient database opener - this.store.batch(ops, function shareChanges () { - // TODO: notify status? - }).catch((exception) => { - self.emit('error', `Could not write to store: ${exception}`); - }).then((output) => { - self.emit('commit', { output }); - }); - } - - if (PATCHES_ENABLED && self.observer) { + if (PATCHES_ENABLED && this.observer) { try { - const patches = manager.generate(self.observer); + const patches = manager.generate(this.observer); if (patches.length) { this.history.push(patches); - self.emit('patches', patches); + this.emit('patches', patches); } } catch (E) { console.error('Could not generate patches:', E); @@ -956,10 +959,11 @@

                                          Source: types/service.js

                                          const commit = new Actor({ type: 'Commit', - state: self.state + state: this.state }); this.emit('commit', { ...commit.toObject(), id: commit.id }); + // this.emit('state', this.state); return commit.id; } @@ -1038,6 +1042,7 @@

                                          Source: types/service.js

                                          id: entity.id, members: [] }, channel); + return channel; } const target = pointer.escape(channel.id); @@ -1102,14 +1107,15 @@

                                          Source: types/service.js

                                          try { // TODO: allow configurable validators - result = manager.applyPatch(this.state, changes, function isValid () { + this._state.content = manager.applyPatch(this.state, changes, function isValid () { + // TODO: invalidate changes without appropriate capability token return true; }, true /* mutate doc (1st param) */); } catch (exception) { console.error('Could not apply changes:', changes, exception); } - await this.commit(); + this.commit(); return result; } @@ -1232,44 +1238,32 @@

                                          Home

                                          Classes

                                          • Actor
                                          • -
                                          • Aggregator
                                          • -
                                          • App
                                          • Bitcoin
                                          • +
                                          • CLI
                                          • Chain
                                          • Channel
                                          • Circuit
                                          • -
                                          • CLI
                                          • Collection
                                          • -
                                          • Compiler
                                          • -
                                          • Consensus
                                          • -
                                          • Entity
                                          • Environment
                                          • -
                                          • Exchange
                                          • Fabric
                                          • Federation
                                          • Filesystem
                                          • -
                                          • Hash256
                                          • HKDF
                                          • HTTPServer
                                          • +
                                          • Hash256
                                          • Identity
                                          • Interface
                                          • Key
                                          • -
                                          • Keystore
                                          • Ledger
                                          • Lightning
                                          • Logger
                                          • Machine
                                          • -
                                          • Mempool
                                          • Message
                                          • -
                                          • Node
                                          • -
                                          • Oracle
                                          • -
                                          • Path
                                          • Peer
                                          • Reader
                                          • Redis
                                          • Remote
                                          • Resource
                                          • -
                                          • Router
                                          • Scribe
                                          • Script
                                          • Service
                                          • @@ -1280,9 +1274,8 @@

                                            Classes

                                          • Stash
                                          • State
                                          • Store
                                          • -
                                          • Swap
                                          • Swarm
                                          • -
                                          • Transition
                                          • +
                                          • Token
                                          • Tree
                                          • Value
                                          • Vector
                                          • diff --git a/docs/types_session.js.html b/docs/types_session.js.html index c2c4f5fdc..af41779ad 100644 --- a/docs/types_session.js.html +++ b/docs/types_session.js.html @@ -241,44 +241,32 @@

                                            Home

                                            Classes

                                            • Actor
                                            • -
                                            • Aggregator
                                            • -
                                            • App
                                            • Bitcoin
                                            • +
                                            • CLI
                                            • Chain
                                            • Channel
                                            • Circuit
                                            • -
                                            • CLI
                                            • Collection
                                            • -
                                            • Compiler
                                            • -
                                            • Consensus
                                            • -
                                            • Entity
                                            • Environment
                                            • -
                                            • Exchange
                                            • Fabric
                                            • Federation
                                            • Filesystem
                                            • -
                                            • Hash256
                                            • HKDF
                                            • HTTPServer
                                            • +
                                            • Hash256
                                            • Identity
                                            • Interface
                                            • Key
                                            • -
                                            • Keystore
                                            • Ledger
                                            • Lightning
                                            • Logger
                                            • Machine
                                            • -
                                            • Mempool
                                            • Message
                                            • -
                                            • Node
                                            • -
                                            • Oracle
                                            • -
                                            • Path
                                            • Peer
                                            • Reader
                                            • Redis
                                            • Remote
                                            • Resource
                                            • -
                                            • Router
                                            • Scribe
                                            • Script
                                            • Service
                                            • @@ -289,9 +277,8 @@

                                              Classes

                                            • Stash
                                            • State
                                            • Store
                                            • -
                                            • Swap
                                            • Swarm
                                            • -
                                            • Transition
                                            • +
                                            • Token
                                            • Tree
                                            • Value
                                            • Vector
                                            • diff --git a/docs/types_signer.js.html b/docs/types_signer.js.html index 8363eea86..9db6d1567 100644 --- a/docs/types_signer.js.html +++ b/docs/types_signer.js.html @@ -219,44 +219,32 @@

                                              Home

                                              Classes

                                              • Actor
                                              • -
                                              • Aggregator
                                              • -
                                              • App
                                              • Bitcoin
                                              • +
                                              • CLI
                                              • Chain
                                              • Channel
                                              • Circuit
                                              • -
                                              • CLI
                                              • Collection
                                              • -
                                              • Compiler
                                              • -
                                              • Consensus
                                              • -
                                              • Entity
                                              • Environment
                                              • -
                                              • Exchange
                                              • Fabric
                                              • Federation
                                              • Filesystem
                                              • -
                                              • Hash256
                                              • HKDF
                                              • HTTPServer
                                              • +
                                              • Hash256
                                              • Identity
                                              • Interface
                                              • Key
                                              • -
                                              • Keystore
                                              • Ledger
                                              • Lightning
                                              • Logger
                                              • Machine
                                              • -
                                              • Mempool
                                              • Message
                                              • -
                                              • Node
                                              • -
                                              • Oracle
                                              • -
                                              • Path
                                              • Peer
                                              • Reader
                                              • Redis
                                              • Remote
                                              • Resource
                                              • -
                                              • Router
                                              • Scribe
                                              • Script
                                              • Service
                                              • @@ -267,9 +255,8 @@

                                                Classes

                                              • Stash
                                              • State
                                              • Store
                                              • -
                                              • Swap
                                              • Swarm
                                              • -
                                              • Transition
                                              • +
                                              • Token
                                              • Tree
                                              • Value
                                              • Vector
                                              • diff --git a/docs/types_snapshot.js.html b/docs/types_snapshot.js.html index 2197016db..42f029b1d 100644 --- a/docs/types_snapshot.js.html +++ b/docs/types_snapshot.js.html @@ -82,44 +82,32 @@

                                                Home

                                                Classes

                                                • Actor
                                                • -
                                                • Aggregator
                                                • -
                                                • App
                                                • Bitcoin
                                                • +
                                                • CLI
                                                • Chain
                                                • Channel
                                                • Circuit
                                                • -
                                                • CLI
                                                • Collection
                                                • -
                                                • Compiler
                                                • -
                                                • Consensus
                                                • -
                                                • Entity
                                                • Environment
                                                • -
                                                • Exchange
                                                • Fabric
                                                • Federation
                                                • Filesystem
                                                • -
                                                • Hash256
                                                • HKDF
                                                • HTTPServer
                                                • +
                                                • Hash256
                                                • Identity
                                                • Interface
                                                • Key
                                                • -
                                                • Keystore
                                                • Ledger
                                                • Lightning
                                                • Logger
                                                • Machine
                                                • -
                                                • Mempool
                                                • Message
                                                • -
                                                • Node
                                                • -
                                                • Oracle
                                                • -
                                                • Path
                                                • Peer
                                                • Reader
                                                • Redis
                                                • Remote
                                                • Resource
                                                • -
                                                • Router
                                                • Scribe
                                                • Script
                                                • Service
                                                • @@ -130,9 +118,8 @@

                                                  Classes

                                                • Stash
                                                • State
                                                • Store
                                                • -
                                                • Swap
                                                • Swarm
                                                • -
                                                • Transition
                                                • +
                                                • Token
                                                • Tree
                                                • Value
                                                • Vector
                                                • diff --git a/docs/types_stack.js.html b/docs/types_stack.js.html index 362df4d25..e5297a27b 100644 --- a/docs/types_stack.js.html +++ b/docs/types_stack.js.html @@ -168,44 +168,32 @@

                                                  Home

                                                  Classes

                                                  • Actor
                                                  • -
                                                  • Aggregator
                                                  • -
                                                  • App
                                                  • Bitcoin
                                                  • +
                                                  • CLI
                                                  • Chain
                                                  • Channel
                                                  • Circuit
                                                  • -
                                                  • CLI
                                                  • Collection
                                                  • -
                                                  • Compiler
                                                  • -
                                                  • Consensus
                                                  • -
                                                  • Entity
                                                  • Environment
                                                  • -
                                                  • Exchange
                                                  • Fabric
                                                  • Federation
                                                  • Filesystem
                                                  • -
                                                  • Hash256
                                                  • HKDF
                                                  • HTTPServer
                                                  • +
                                                  • Hash256
                                                  • Identity
                                                  • Interface
                                                  • Key
                                                  • -
                                                  • Keystore
                                                  • Ledger
                                                  • Lightning
                                                  • Logger
                                                  • Machine
                                                  • -
                                                  • Mempool
                                                  • Message
                                                  • -
                                                  • Node
                                                  • -
                                                  • Oracle
                                                  • -
                                                  • Path
                                                  • Peer
                                                  • Reader
                                                  • Redis
                                                  • Remote
                                                  • Resource
                                                  • -
                                                  • Router
                                                  • Scribe
                                                  • Script
                                                  • Service
                                                  • @@ -216,9 +204,8 @@

                                                    Classes

                                                  • Stash
                                                  • State
                                                  • Store
                                                  • -
                                                  • Swap
                                                  • Swarm
                                                  • -
                                                  • Transition
                                                  • +
                                                  • Token
                                                  • Tree
                                                  • Value
                                                  • Vector
                                                  • diff --git a/docs/types_state.js.html b/docs/types_state.js.html index d7da3f3dd..65c074500 100644 --- a/docs/types_state.js.html +++ b/docs/types_state.js.html @@ -515,44 +515,32 @@

                                                    Home

                                                    Classes

                                                    • Actor
                                                    • -
                                                    • Aggregator
                                                    • -
                                                    • App
                                                    • Bitcoin
                                                    • +
                                                    • CLI
                                                    • Chain
                                                    • Channel
                                                    • Circuit
                                                    • -
                                                    • CLI
                                                    • Collection
                                                    • -
                                                    • Compiler
                                                    • -
                                                    • Consensus
                                                    • -
                                                    • Entity
                                                    • Environment
                                                    • -
                                                    • Exchange
                                                    • Fabric
                                                    • Federation
                                                    • Filesystem
                                                    • -
                                                    • Hash256
                                                    • HKDF
                                                    • HTTPServer
                                                    • +
                                                    • Hash256
                                                    • Identity
                                                    • Interface
                                                    • Key
                                                    • -
                                                    • Keystore
                                                    • Ledger
                                                    • Lightning
                                                    • Logger
                                                    • Machine
                                                    • -
                                                    • Mempool
                                                    • Message
                                                    • -
                                                    • Node
                                                    • -
                                                    • Oracle
                                                    • -
                                                    • Path
                                                    • Peer
                                                    • Reader
                                                    • Redis
                                                    • Remote
                                                    • Resource
                                                    • -
                                                    • Router
                                                    • Scribe
                                                    • Script
                                                    • Service
                                                    • @@ -563,9 +551,8 @@

                                                      Classes

                                                    • Stash
                                                    • State
                                                    • Store
                                                    • -
                                                    • Swap
                                                    • Swarm
                                                    • -
                                                    • Transition
                                                    • +
                                                    • Token
                                                    • Tree
                                                    • Value
                                                    • Vector
                                                    • diff --git a/docs/types_store.js.html b/docs/types_store.js.html index 5b5595a60..9d5926377 100644 --- a/docs/types_store.js.html +++ b/docs/types_store.js.html @@ -34,7 +34,7 @@

                                                      Source: types/store.js

                                                      'use strict';
                                                       
                                                       // Dependencies
                                                      -const level = require('level');
                                                      +const { Level } = require('level');
                                                       const crypto = require('crypto');
                                                       const pointer = require('json-pointer');
                                                       
                                                      @@ -423,7 +423,7 @@ 

                                                      Source: types/store.js

                                                      // if (this.db) return this; try { - this.db = level(this.settings.path); + this.db = new Level(this.settings.path); this.trust(this.db); this.status = 'opened'; await this.commit(); @@ -617,44 +617,32 @@

                                                      Home

                                                      Classes

                                                      • Actor
                                                      • -
                                                      • Aggregator
                                                      • -
                                                      • App
                                                      • Bitcoin
                                                      • +
                                                      • CLI
                                                      • Chain
                                                      • Channel
                                                      • Circuit
                                                      • -
                                                      • CLI
                                                      • Collection
                                                      • -
                                                      • Compiler
                                                      • -
                                                      • Consensus
                                                      • -
                                                      • Entity
                                                      • Environment
                                                      • -
                                                      • Exchange
                                                      • Fabric
                                                      • Federation
                                                      • Filesystem
                                                      • -
                                                      • Hash256
                                                      • HKDF
                                                      • HTTPServer
                                                      • +
                                                      • Hash256
                                                      • Identity
                                                      • Interface
                                                      • Key
                                                      • -
                                                      • Keystore
                                                      • Ledger
                                                      • Lightning
                                                      • Logger
                                                      • Machine
                                                      • -
                                                      • Mempool
                                                      • Message
                                                      • -
                                                      • Node
                                                      • -
                                                      • Oracle
                                                      • -
                                                      • Path
                                                      • Peer
                                                      • Reader
                                                      • Redis
                                                      • Remote
                                                      • Resource
                                                      • -
                                                      • Router
                                                      • Scribe
                                                      • Script
                                                      • Service
                                                      • @@ -665,9 +653,8 @@

                                                        Classes

                                                      • Stash
                                                      • State
                                                      • Store
                                                      • -
                                                      • Swap
                                                      • Swarm
                                                      • -
                                                      • Transition
                                                      • +
                                                      • Token
                                                      • Tree
                                                      • Value
                                                      • Vector
                                                      • diff --git a/docs/types_swap.js.html b/docs/types_swap.js.html index e4e2a391a..5ef492e81 100644 --- a/docs/types_swap.js.html +++ b/docs/types_swap.js.html @@ -41,17 +41,7 @@

                                                        Source: types/swap.js

                                                        // Native Dependencies const crypto = require('crypto'); -/** - * The {@link Swap} contract executes a set of transactions on two distinct - * {@link Chain} components, utilizing a secret-reveal mechanism to atomically - * execute either the full set or none. - * @type {Object} - */ class Swap { - /** - * Atomically execute a set of transactions across two {@link Chain} components. - * @param {Object} [settings={}] Configuration for the swap. - */ constructor (settings = {}) { this.settings = Object.assign({ chain: 'bitcoin:regtest' @@ -269,44 +259,32 @@

                                                        Home

                                                        Classes

                                                        • Actor
                                                        • -
                                                        • Aggregator
                                                        • -
                                                        • App
                                                        • Bitcoin
                                                        • +
                                                        • CLI
                                                        • Chain
                                                        • Channel
                                                        • Circuit
                                                        • -
                                                        • CLI
                                                        • Collection
                                                        • -
                                                        • Compiler
                                                        • -
                                                        • Consensus
                                                        • -
                                                        • Entity
                                                        • Environment
                                                        • -
                                                        • Exchange
                                                        • Fabric
                                                        • Federation
                                                        • Filesystem
                                                        • -
                                                        • Hash256
                                                        • HKDF
                                                        • HTTPServer
                                                        • +
                                                        • Hash256
                                                        • Identity
                                                        • Interface
                                                        • Key
                                                        • -
                                                        • Keystore
                                                        • Ledger
                                                        • Lightning
                                                        • Logger
                                                        • Machine
                                                        • -
                                                        • Mempool
                                                        • Message
                                                        • -
                                                        • Node
                                                        • -
                                                        • Oracle
                                                        • -
                                                        • Path
                                                        • Peer
                                                        • Reader
                                                        • Redis
                                                        • Remote
                                                        • Resource
                                                        • -
                                                        • Router
                                                        • Scribe
                                                        • Script
                                                        • Service
                                                        • @@ -317,9 +295,8 @@

                                                          Classes

                                                        • Stash
                                                        • State
                                                        • Store
                                                        • -
                                                        • Swap
                                                        • Swarm
                                                        • -
                                                        • Transition
                                                        • +
                                                        • Token
                                                        • Tree
                                                        • Value
                                                        • Vector
                                                        • diff --git a/docs/types_swarm.js.html b/docs/types_swarm.js.html index 83c6d72d2..5907efd09 100644 --- a/docs/types_swarm.js.html +++ b/docs/types_swarm.js.html @@ -243,44 +243,32 @@

                                                          Home

                                                          Classes

                                                          • Actor
                                                          • -
                                                          • Aggregator
                                                          • -
                                                          • App
                                                          • Bitcoin
                                                          • +
                                                          • CLI
                                                          • Chain
                                                          • Channel
                                                          • Circuit
                                                          • -
                                                          • CLI
                                                          • Collection
                                                          • -
                                                          • Compiler
                                                          • -
                                                          • Consensus
                                                          • -
                                                          • Entity
                                                          • Environment
                                                          • -
                                                          • Exchange
                                                          • Fabric
                                                          • Federation
                                                          • Filesystem
                                                          • -
                                                          • Hash256
                                                          • HKDF
                                                          • HTTPServer
                                                          • +
                                                          • Hash256
                                                          • Identity
                                                          • Interface
                                                          • Key
                                                          • -
                                                          • Keystore
                                                          • Ledger
                                                          • Lightning
                                                          • Logger
                                                          • Machine
                                                          • -
                                                          • Mempool
                                                          • Message
                                                          • -
                                                          • Node
                                                          • -
                                                          • Oracle
                                                          • -
                                                          • Path
                                                          • Peer
                                                          • Reader
                                                          • Redis
                                                          • Remote
                                                          • Resource
                                                          • -
                                                          • Router
                                                          • Scribe
                                                          • Script
                                                          • Service
                                                          • @@ -291,9 +279,8 @@

                                                            Classes

                                                          • Stash
                                                          • State
                                                          • Store
                                                          • -
                                                          • Swap
                                                          • Swarm
                                                          • -
                                                          • Transition
                                                          • +
                                                          • Token
                                                          • Tree
                                                          • Value
                                                          • Vector
                                                          • diff --git a/docs/types_token.js.html b/docs/types_token.js.html new file mode 100644 index 000000000..d371ee420 --- /dev/null +++ b/docs/types_token.js.html @@ -0,0 +1,256 @@ + + + + + + Source: types/token.js · Docs + + + + + + + + + +
                                                            +

                                                            Source: types/token.js

                                                            + + + + +
                                                            +
                                                            +
                                                            'use strict';
                                                            +
                                                            +// Dependencies
                                                            +const bitcoin = require('bitcoinjs-lib');
                                                            +const schnorr = require('bip-schnorr');
                                                            +
                                                            +// Fabric Types
                                                            +const Key = require('./key');
                                                            +
                                                            +/**
                                                            + * Implements a capability-based security token.
                                                            + */
                                                            +class Token {
                                                            +  /**
                                                            +   * Create a new Fabric Token.
                                                            +   * @param {Object} [settings] Configuration.
                                                            +   * @returns {Token} The token instance.
                                                            +   */
                                                            +  constructor (settings = {}) {
                                                            +    // TODO: determine rounding preference (secwise)
                                                            +    this.created = Date.now();
                                                            +    this.settings = Object.assign({
                                                            +      capability: 'OP_0',
                                                            +      issuer: null,
                                                            +      subject: null,
                                                            +      state: {
                                                            +        status: 'READY'
                                                            +      }
                                                            +    }, settings);
                                                            +
                                                            +    // Capability
                                                            +    this.capability = this.settings.capability;
                                                            +    this.ephemera = new Key();
                                                            +
                                                            +    // Trust Chain
                                                            +    this.issuer = this.settings.issuer ? this.settings.issuer : this.ephemera;
                                                            +    this.subject = this.settings.subject ? this.settings.subject : this.ephemera.keypair.getPublic(true).encodeCompressed('hex');
                                                            +
                                                            +    // ECDSA Signature
                                                            +    this.signature = null;
                                                            +
                                                            +    // State
                                                            +    this._state = {
                                                            +      content: this.settings.state
                                                            +    };
                                                            +
                                                            +    return this;
                                                            +  }
                                                            +
                                                            +  get state () {
                                                            +    return JSON.parse(JSON.stringify(this._state.content));
                                                            +  }
                                                            +
                                                            +  static base64UrlEncode (input) {
                                                            +    const base64 = Buffer.from(input, 'utf8').toString('base64');
                                                            +    return base64.replace('+', '-').replace('/', '_').replace(/=+$/, '');
                                                            +  }
                                                            +
                                                            +  static base64UrlDecode (input) {
                                                            +    input = input.replace(/-/g, '+').replace(/_/g, '/');
                                                            +
                                                            +    while (input.length % 4) {
                                                            +      input += '=';
                                                            +    }
                                                            +
                                                            +    return Buffer.from(input, 'base64').toString();
                                                            +  }
                                                            +
                                                            +  static fromString (input) {
                                                            +    const parts = input.split('.');
                                                            +    const headers = parts[0];
                                                            +    const payload = parts[1];
                                                            +    const signature = parts[2];
                                                            +    const inner = Token.base64UrlDecode(payload);
                                                            +
                                                            +    return new Token({
                                                            +      capability: inner.cap,
                                                            +      issuer: inner.iss,
                                                            +      subject: inner.sub,
                                                            +      state: inner.state,
                                                            +      signature: signature
                                                            +    });
                                                            +  }
                                                            +
                                                            +  toString () {
                                                            +    // TODO: determine rounding preference (secwise)
                                                            +    const utime = Math.floor(this.created / 1000);
                                                            +    const issuer = this.issuer.keypair.getPublic(true).encodeCompressed('hex');
                                                            +    const header = {
                                                            +      alg: 'ES256K',
                                                            +      iss: issuer,
                                                            +      typ: 'JWT'
                                                            +    };
                                                            +
                                                            +    const payload = {
                                                            +      cap: this.capability,
                                                            +      iat: utime,
                                                            +      iss: issuer,
                                                            +      sub: this.subject,
                                                            +      state: this.state
                                                            +    };
                                                            +
                                                            +    // TODO: reconcile with JWT spec
                                                            +    // alternatively, since we're already breaking spec,
                                                            +    // we can diverge again here.
                                                            +    // Secret: HS256
                                                            +    const secret = 'ffff';
                                                            +
                                                            +    // Encodings
                                                            +    const encodedHeader = Token.base64UrlEncode(JSON.stringify(header));
                                                            +    const encodedPayload = Token.base64UrlEncode(JSON.stringify(payload));
                                                            +    const signature = bitcoin.crypto.sha256(
                                                            +      Buffer.from(`${encodedHeader}.${encodedPayload}.${secret}`)
                                                            +    );
                                                            +
                                                            +    return [
                                                            +      encodedHeader,
                                                            +      encodedPayload,
                                                            +      Token.base64UrlEncode(signature.toString('hex'))
                                                            +    ].join('.');
                                                            +  }
                                                            +
                                                            +  sign () {
                                                            +    // Sign the capability using the private key
                                                            +    const hash = bitcoin.crypto.sha256(this.capability);
                                                            +    this.signature = schnorr.sign(this.issuer.privateKey, hash);
                                                            +  }
                                                            +
                                                            +  verify () {
                                                            +    // Verify the signature using the public key
                                                            +    const hash = bitcoin.crypto.sha256(this.capability);
                                                            +    return schnorr.verify(this.issuer.publicKey, hash, this.signature);
                                                            +  }
                                                            +
                                                            +  add (other) {
                                                            +    const combinedCapability = [this.capability, other.capability].join(' ');
                                                            +    const combinedToken = new Token({
                                                            +      capability: combinedCapability,
                                                            +      issuer: this.issuer.publicKey
                                                            +    });
                                                            +
                                                            +    /* combinedToken.signature = schnorr.combine([
                                                            +      this.signature,
                                                            +      other.signature
                                                            +    ]); */
                                                            +
                                                            +    return combinedToken;
                                                            +  }
                                                            +}
                                                            +
                                                            +module.exports = Token;
                                                            +
                                                            +
                                                            +
                                                            + + + +
                                                            + +
                                                            + + + + + + \ No newline at end of file diff --git a/docs/types_tree.js.html b/docs/types_tree.js.html index e0fc43d18..b84477374 100644 --- a/docs/types_tree.js.html +++ b/docs/types_tree.js.html @@ -113,44 +113,32 @@

                                                            Home

                                                            Classes

                                                            • Actor
                                                            • -
                                                            • Aggregator
                                                            • -
                                                            • App
                                                            • Bitcoin
                                                            • +
                                                            • CLI
                                                            • Chain
                                                            • Channel
                                                            • Circuit
                                                            • -
                                                            • CLI
                                                            • Collection
                                                            • -
                                                            • Compiler
                                                            • -
                                                            • Consensus
                                                            • -
                                                            • Entity
                                                            • Environment
                                                            • -
                                                            • Exchange
                                                            • Fabric
                                                            • Federation
                                                            • Filesystem
                                                            • -
                                                            • Hash256
                                                            • HKDF
                                                            • HTTPServer
                                                            • +
                                                            • Hash256
                                                            • Identity
                                                            • Interface
                                                            • Key
                                                            • -
                                                            • Keystore
                                                            • Ledger
                                                            • Lightning
                                                            • Logger
                                                            • Machine
                                                            • -
                                                            • Mempool
                                                            • Message
                                                            • -
                                                            • Node
                                                            • -
                                                            • Oracle
                                                            • -
                                                            • Path
                                                            • Peer
                                                            • Reader
                                                            • Redis
                                                            • Remote
                                                            • Resource
                                                            • -
                                                            • Router
                                                            • Scribe
                                                            • Script
                                                            • Service
                                                            • @@ -161,9 +149,8 @@

                                                              Classes

                                                            • Stash
                                                            • State
                                                            • Store
                                                            • -
                                                            • Swap
                                                            • Swarm
                                                            • -
                                                            • Transition
                                                            • +
                                                            • Token
                                                            • Tree
                                                            • Value
                                                            • Vector
                                                            • diff --git a/docs/types_value.js.html b/docs/types_value.js.html index 5c6be776b..25ccf2585 100644 --- a/docs/types_value.js.html +++ b/docs/types_value.js.html @@ -73,44 +73,32 @@

                                                              Home

                                                              Classes

                                                              • Actor
                                                              • -
                                                              • Aggregator
                                                              • -
                                                              • App
                                                              • Bitcoin
                                                              • +
                                                              • CLI
                                                              • Chain
                                                              • Channel
                                                              • Circuit
                                                              • -
                                                              • CLI
                                                              • Collection
                                                              • -
                                                              • Compiler
                                                              • -
                                                              • Consensus
                                                              • -
                                                              • Entity
                                                              • Environment
                                                              • -
                                                              • Exchange
                                                              • Fabric
                                                              • Federation
                                                              • Filesystem
                                                              • -
                                                              • Hash256
                                                              • HKDF
                                                              • HTTPServer
                                                              • +
                                                              • Hash256
                                                              • Identity
                                                              • Interface
                                                              • Key
                                                              • -
                                                              • Keystore
                                                              • Ledger
                                                              • Lightning
                                                              • Logger
                                                              • Machine
                                                              • -
                                                              • Mempool
                                                              • Message
                                                              • -
                                                              • Node
                                                              • -
                                                              • Oracle
                                                              • -
                                                              • Path
                                                              • Peer
                                                              • Reader
                                                              • Redis
                                                              • Remote
                                                              • Resource
                                                              • -
                                                              • Router
                                                              • Scribe
                                                              • Script
                                                              • Service
                                                              • @@ -121,9 +109,8 @@

                                                                Classes

                                                              • Stash
                                                              • State
                                                              • Store
                                                              • -
                                                              • Swap
                                                              • Swarm
                                                              • -
                                                              • Transition
                                                              • +
                                                              • Token
                                                              • Tree
                                                              • Value
                                                              • Vector
                                                              • diff --git a/docs/types_vector.js.html b/docs/types_vector.js.html index 9f15e3a2f..fd56a8fe8 100644 --- a/docs/types_vector.js.html +++ b/docs/types_vector.js.html @@ -140,44 +140,32 @@

                                                                Home

                                                                Classes

                                                                • Actor
                                                                • -
                                                                • Aggregator
                                                                • -
                                                                • App
                                                                • Bitcoin
                                                                • +
                                                                • CLI
                                                                • Chain
                                                                • Channel
                                                                • Circuit
                                                                • -
                                                                • CLI
                                                                • Collection
                                                                • -
                                                                • Compiler
                                                                • -
                                                                • Consensus
                                                                • -
                                                                • Entity
                                                                • Environment
                                                                • -
                                                                • Exchange
                                                                • Fabric
                                                                • Federation
                                                                • Filesystem
                                                                • -
                                                                • Hash256
                                                                • HKDF
                                                                • HTTPServer
                                                                • +
                                                                • Hash256
                                                                • Identity
                                                                • Interface
                                                                • Key
                                                                • -
                                                                • Keystore
                                                                • Ledger
                                                                • Lightning
                                                                • Logger
                                                                • Machine
                                                                • -
                                                                • Mempool
                                                                • Message
                                                                • -
                                                                • Node
                                                                • -
                                                                • Oracle
                                                                • -
                                                                • Path
                                                                • Peer
                                                                • Reader
                                                                • Redis
                                                                • Remote
                                                                • Resource
                                                                • -
                                                                • Router
                                                                • Scribe
                                                                • Script
                                                                • Service
                                                                • @@ -188,9 +176,8 @@

                                                                  Classes

                                                                • Stash
                                                                • State
                                                                • Store
                                                                • -
                                                                • Swap
                                                                • Swarm
                                                                • -
                                                                • Transition
                                                                • +
                                                                • Token
                                                                • Tree
                                                                • Value
                                                                • Vector
                                                                • diff --git a/docs/types_walker.js.html b/docs/types_walker.js.html index 2d72f65db..f24c15d72 100644 --- a/docs/types_walker.js.html +++ b/docs/types_walker.js.html @@ -120,44 +120,32 @@

                                                                  Home

                                                                  Classes

                                                                  • Actor
                                                                  • -
                                                                  • Aggregator
                                                                  • -
                                                                  • App
                                                                  • Bitcoin
                                                                  • +
                                                                  • CLI
                                                                  • Chain
                                                                  • Channel
                                                                  • Circuit
                                                                  • -
                                                                  • CLI
                                                                  • Collection
                                                                  • -
                                                                  • Compiler
                                                                  • -
                                                                  • Consensus
                                                                  • -
                                                                  • Entity
                                                                  • Environment
                                                                  • -
                                                                  • Exchange
                                                                  • Fabric
                                                                  • Federation
                                                                  • Filesystem
                                                                  • -
                                                                  • Hash256
                                                                  • HKDF
                                                                  • HTTPServer
                                                                  • +
                                                                  • Hash256
                                                                  • Identity
                                                                  • Interface
                                                                  • Key
                                                                  • -
                                                                  • Keystore
                                                                  • Ledger
                                                                  • Lightning
                                                                  • Logger
                                                                  • Machine
                                                                  • -
                                                                  • Mempool
                                                                  • Message
                                                                  • -
                                                                  • Node
                                                                  • -
                                                                  • Oracle
                                                                  • -
                                                                  • Path
                                                                  • Peer
                                                                  • Reader
                                                                  • Redis
                                                                  • Remote
                                                                  • Resource
                                                                  • -
                                                                  • Router
                                                                  • Scribe
                                                                  • Script
                                                                  • Service
                                                                  • @@ -168,9 +156,8 @@

                                                                    Classes

                                                                  • Stash
                                                                  • State
                                                                  • Store
                                                                  • -
                                                                  • Swap
                                                                  • Swarm
                                                                  • -
                                                                  • Transition
                                                                  • +
                                                                  • Token
                                                                  • Tree
                                                                  • Value
                                                                  • Vector
                                                                  • diff --git a/docs/types_wallet.js.html b/docs/types_wallet.js.html index 30e9a44e2..ac8f6e241 100644 --- a/docs/types_wallet.js.html +++ b/docs/types_wallet.js.html @@ -186,6 +186,14 @@

                                                                    Source: types/wallet.js

                                                                    return this.get('/orders'); } + get xprv () { + return this.key.xprv; + } + + get xpub () { + return this.key.xpub; + } + get version () { return this.settings.version; } @@ -329,6 +337,8 @@

                                                                    Source: types/wallet.js

                                                                    * Start the wallet, including listening for transactions. */ start () { + // console.debug('[DEBUG]', 'Wallet starting...'); + this.emit('debug', '[FABRIC] Wallet starting...'); this.status = 'STARTING'; this._load(); this.status = 'STARTED'; @@ -1471,44 +1481,32 @@

                                                                    Home

                                                                    Classes

                                                                    • Actor
                                                                    • -
                                                                    • Aggregator
                                                                    • -
                                                                    • App
                                                                    • Bitcoin
                                                                    • +
                                                                    • CLI
                                                                    • Chain
                                                                    • Channel
                                                                    • Circuit
                                                                    • -
                                                                    • CLI
                                                                    • Collection
                                                                    • -
                                                                    • Compiler
                                                                    • -
                                                                    • Consensus
                                                                    • -
                                                                    • Entity
                                                                    • Environment
                                                                    • -
                                                                    • Exchange
                                                                    • Fabric
                                                                    • Federation
                                                                    • Filesystem
                                                                    • -
                                                                    • Hash256
                                                                    • HKDF
                                                                    • HTTPServer
                                                                    • +
                                                                    • Hash256
                                                                    • Identity
                                                                    • Interface
                                                                    • Key
                                                                    • -
                                                                    • Keystore
                                                                    • Ledger
                                                                    • Lightning
                                                                    • Logger
                                                                    • Machine
                                                                    • -
                                                                    • Mempool
                                                                    • Message
                                                                    • -
                                                                    • Node
                                                                    • -
                                                                    • Oracle
                                                                    • -
                                                                    • Path
                                                                    • Peer
                                                                    • Reader
                                                                    • Redis
                                                                    • Remote
                                                                    • Resource
                                                                    • -
                                                                    • Router
                                                                    • Scribe
                                                                    • Script
                                                                    • Service
                                                                    • @@ -1519,9 +1517,8 @@

                                                                      Classes

                                                                    • Stash
                                                                    • State
                                                                    • Store
                                                                    • -
                                                                    • Swap
                                                                    • Swarm
                                                                    • -
                                                                    • Transition
                                                                    • +
                                                                    • Token
                                                                    • Tree
                                                                    • Value
                                                                    • Vector
                                                                    • diff --git a/docs/types_witness.js.html b/docs/types_witness.js.html index 90db5e4f1..2fa1e1d88 100644 --- a/docs/types_witness.js.html +++ b/docs/types_witness.js.html @@ -197,44 +197,32 @@

                                                                      Home

                                                                      Classes

                                                                      • Actor
                                                                      • -
                                                                      • Aggregator
                                                                      • -
                                                                      • App
                                                                      • Bitcoin
                                                                      • +
                                                                      • CLI
                                                                      • Chain
                                                                      • Channel
                                                                      • Circuit
                                                                      • -
                                                                      • CLI
                                                                      • Collection
                                                                      • -
                                                                      • Compiler
                                                                      • -
                                                                      • Consensus
                                                                      • -
                                                                      • Entity
                                                                      • Environment
                                                                      • -
                                                                      • Exchange
                                                                      • Fabric
                                                                      • Federation
                                                                      • Filesystem
                                                                      • -
                                                                      • Hash256
                                                                      • HKDF
                                                                      • HTTPServer
                                                                      • +
                                                                      • Hash256
                                                                      • Identity
                                                                      • Interface
                                                                      • Key
                                                                      • -
                                                                      • Keystore
                                                                      • Ledger
                                                                      • Lightning
                                                                      • Logger
                                                                      • Machine
                                                                      • -
                                                                      • Mempool
                                                                      • Message
                                                                      • -
                                                                      • Node
                                                                      • -
                                                                      • Oracle
                                                                      • -
                                                                      • Path
                                                                      • Peer
                                                                      • Reader
                                                                      • Redis
                                                                      • Remote
                                                                      • Resource
                                                                      • -
                                                                      • Router
                                                                      • Scribe
                                                                      • Script
                                                                      • Service
                                                                      • @@ -245,9 +233,8 @@

                                                                        Classes

                                                                      • Stash
                                                                      • State
                                                                      • Store
                                                                      • -
                                                                      • Swap
                                                                      • Swarm
                                                                      • -
                                                                      • Transition
                                                                      • +
                                                                      • Token
                                                                      • Tree
                                                                      • Value
                                                                      • Vector
                                                                      • diff --git a/docs/types_worker.js.html b/docs/types_worker.js.html index fa576431f..0bb279ea3 100644 --- a/docs/types_worker.js.html +++ b/docs/types_worker.js.html @@ -102,44 +102,32 @@

                                                                        Home

                                                                        Classes

                                                                        • Actor
                                                                        • -
                                                                        • Aggregator
                                                                        • -
                                                                        • App
                                                                        • Bitcoin
                                                                        • +
                                                                        • CLI
                                                                        • Chain
                                                                        • Channel
                                                                        • Circuit
                                                                        • -
                                                                        • CLI
                                                                        • Collection
                                                                        • -
                                                                        • Compiler
                                                                        • -
                                                                        • Consensus
                                                                        • -
                                                                        • Entity
                                                                        • Environment
                                                                        • -
                                                                        • Exchange
                                                                        • Fabric
                                                                        • Federation
                                                                        • Filesystem
                                                                        • -
                                                                        • Hash256
                                                                        • HKDF
                                                                        • HTTPServer
                                                                        • +
                                                                        • Hash256
                                                                        • Identity
                                                                        • Interface
                                                                        • Key
                                                                        • -
                                                                        • Keystore
                                                                        • Ledger
                                                                        • Lightning
                                                                        • Logger
                                                                        • Machine
                                                                        • -
                                                                        • Mempool
                                                                        • Message
                                                                        • -
                                                                        • Node
                                                                        • -
                                                                        • Oracle
                                                                        • -
                                                                        • Path
                                                                        • Peer
                                                                        • Reader
                                                                        • Redis
                                                                        • Remote
                                                                        • Resource
                                                                        • -
                                                                        • Router
                                                                        • Scribe
                                                                        • Script
                                                                        • Service
                                                                        • @@ -150,9 +138,8 @@

                                                                          Classes

                                                                        • Stash
                                                                        • State
                                                                        • Store
                                                                        • -
                                                                        • Swap
                                                                        • Swarm
                                                                        • -
                                                                        • Transition
                                                                        • +
                                                                        • Token
                                                                        • Tree
                                                                        • Value
                                                                        • Vector
                                                                        • diff --git a/examples/app.js b/examples/app.js index ae0eaad57..66938013b 100644 --- a/examples/app.js +++ b/examples/app.js @@ -5,7 +5,7 @@ // This example is intended for downstream consumers — those seeking to implement client-facing applications using Fabric. // // ## Quickstart -// Ensure that you are using NodeJS `18.19.0` — execute in your clone of the Fabric Core repository. +// Ensure that you are using NodeJS `18.19.1` — execute in your clone of the Fabric Core repository. // // ### Cloning Fabric // Run the following commands: diff --git a/package-lock.json b/package-lock.json index 27382cdcf..3e9689d03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,79 +9,115 @@ "version": "0.1.0-RC1", "license": "MIT", "dependencies": { - "arbitrary": "1.4.10", - "base58check": "2.0.0", - "bech32-buffer": "0.2.0", - "bip-schnorr": "0.6.6", - "bip32": "4.0.0", - "bip39": "3.0.4", - "bip65": "1.0.3", - "bip68": "1.0.4", - "bitcoinjs-lib": "6.0.0", - "blessed": "0.1.81", - "bn.js": "5.2.1", - "buffer": "6.0.3", - "commander": "6.1.0", - "content-type": "1.0.4", - "cross-fetch": "3.1.5", - "dotparser": "0.3.0", - "ecpair": "2.0.1", - "elliptic": "6.5.4", - "events": "3.3.0", - "fast-json-patch": "3.1.1", - "is-my-json-valid": "2.20.6", - "javascript-state-machine": "3.1.0", - "jayson": "4.0.0", - "json-pointer": "0.6.2", - "jsonpointer": "5.0.1", - "level": "7.0.1", - "lodash.merge": "4.6.2", - "macaroon": "3.0.4", - "merkletreejs": "0.3.11", - "minsc": "0.2.0", - "mkdirp": "1.0.4", - "noise-protocol-stream": "1.1.3", - "path-match": "1.2.4", - "pluralize": "8.0.0", - "redis": "3.1.2", - "rimraf": "2.6.2", - "simple-aes": "0.1.1", - "struct": "0.0.12", - "tiny-secp256k1": "2.2.1", - "zeromq": "v6.0.0-beta.19" + "arbitrary": "=1.4.10", + "base58check": "=2.0.0", + "bech32-buffer": "=0.2.1", + "bip-schnorr": "=0.6.6", + "bip32": "=4.0.0", + "bip39": "=3.1.0", + "bip65": "=1.0.3", + "bip68": "=1.0.4", + "bitcoinjs-lib": "=6.0.0", + "blessed": "=0.1.81", + "bn.js": "=5.2.1", + "buffer": "=6.0.3", + "commander": "=12.1.0", + "content-type": "=1.0.4", + "cross-fetch": "=4.0.0", + "dotparser": "=1.1.1", + "ecpair": "=2.0.1", + "elliptic": "=6.6.0", + "events": "=3.3.0", + "fast-json-patch": "=3.1.1", + "javascript-state-machine": "=3.1.0", + "jayson": "=4.1.2", + "json-pointer": "=0.6.2", + "jsonpointer": "=5.0.1", + "level": "=9.0.0", + "lodash.merge": "=4.6.2", + "macaroon": "=3.0.4", + "merkletreejs": "=0.4.0", + "minsc": "=0.2.0", + "mkdirp": "=1.0.4", + "noise-protocol-stream": "=1.1.3", + "path-match": "=1.2.4", + "pluralize": "=8.0.0", + "redis": "=4.7.0", + "simple-aes": "=0.1.1", + "struct": "=0.0.12", + "tiny-secp256k1": "=2.2.3", + "zeromq": "=6.1.1" }, "bin": { "fabric": "scripts/cli.js" }, "devDependencies": { - "c8": "7.11.3", - "chai": "4.0.2", - "cross-env": "5.1.3", - "debug-trace": "2.2.1", - "docco": "0.9.1", - "eccrypto": "1.0.3", - "eslint": "5.16.0", - "glob-run": "0.1.7", - "honkit": "4.0.7", - "http-server": "14.1.1", - "js-beautify": "1.14.3", - "jsdoc": "4.0.2", - "jsdoc-to-markdown": "7.1.1", - "json-to-dot": "1.1.0", - "mocha": "10.2.0" - }, - "engines": { - "node": "18.19.0" - } - }, - "node_modules/@aminya/node-gyp-build": { - "version": "4.5.0-aminya.5", - "resolved": "https://registry.npmjs.org/@aminya/node-gyp-build/-/node-gyp-build-4.5.0-aminya.5.tgz", - "integrity": "sha512-TO7GldxDfSeSRNZVmhlm0liS2GX2o2Q/qTlcD3iD4ltTM6dir568LTRZ+ZDsDbLfMAkfhrbU+VuzNYImwYfczg==", + "c8": "=7.11.3", + "chai": "=4.0.2", + "cross-env": "=5.2.1", + "debug-trace": "=2.2.1", + "docco": "=0.9.1", + "eslint": "=9.16.0", + "honkit": "=6.0.2", + "http-server": "=14.1.1", + "is-my-json-valid": "=2.20.6", + "js-beautify": "=1.14.3", + "jsdoc": "=4.0.2", + "jsdoc-to-markdown": "=7.1.1", + "json-to-dot": "=1.1.0", + "mocha": "=10.2.0" + }, + "engines": { + "node": "18.19.1" + } + }, + "node_modules/@aminya/cmake-ts": { + "version": "0.3.0-aminya.7", + "resolved": "https://registry.npmjs.org/@aminya/cmake-ts/-/cmake-ts-0.3.0-aminya.7.tgz", + "integrity": "sha512-y6a2Nq1Pj+3Y0tOLob2q0LbCB4cGIbcXJqDO10W51XpqUdB30OU0Xvl6ZDHFluHm/8nY5Vx/Ua9mxobG975//Q==", + "dependencies": { + "@cypress/request": "^3.0.5", + "fast-glob": "^3.3.2", + "fs-extra": "^10", + "lodash": "^4.17.21", + "memory-stream": "1.0.0", + "minizlib": "^2", + "npmlog": "^6", + "resolve": "^1.22.8", + "semver": "^7.6.3", + "splitargs2": "^0.1.3", + "tar": "^6", + "unzipper": "^0.12.3", + "url-join": "^4.0.1", + "which": "^2" + }, + "bin": { + "cmake-ts": "build/main.js" + } + }, + "node_modules/@aminya/cmake-ts/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { - "aminya-node-gyp-build": "bin.js", - "aminya-node-gyp-build-optional": "optional.js", - "aminya-node-gyp-build-test": "build-test.js" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@aminya/cmake-ts/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, "node_modules/@asciidoctor/cli": { @@ -105,9 +141,9 @@ } }, "node_modules/@asciidoctor/core": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.7.tgz", - "integrity": "sha512-63cfnV606vXNUnh/zcuUi5e3tY5qTzaYY5pGP4p9sRk8CcCmX4Z8OfU0BkfM8/k2Y7Cz/jZqxL+vzHjrLQa8tw==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/@asciidoctor/core/-/core-2.2.8.tgz", + "integrity": "sha512-oozXk7ZO1RAd/KLFLkKOhqTcG4GO3CV44WwOFg2gMcCsqCUTarvMT7xERIoWW2WurKbB0/ce+98r01p8xPOlBw==", "dev": true, "dependencies": { "asciidoctor-opal-runtime": "0.3.3", @@ -119,53 +155,50 @@ "yarn": ">=1.1.0" } }, - "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, - "dependencies": { - "@babel/highlight": "^7.24.2", - "picocolors": "^1.0.0" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", + "node_modules/@babel/parser": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/types": "^7.26.3" + }, + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": ">=6.9.0" + "node": ">=6.0.0" } }, - "node_modules/@babel/parser": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", - "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", + "node_modules/@babel/types": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", "dev": true, - "bin": { - "parser": "bin/babel-parser.js" + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, "node_modules/@bcoe/v8-coverage": { @@ -174,6 +207,152 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@cypress/request": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.7.tgz", + "integrity": "sha512-LzxlLEMbBOPYB85uXrDqvD4MgcenjRBLIns3zyhx7vTPj/0u2eQhzXvPiGcaJrV38Q9dbkExWp6cOHPJ+EtFYg==", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~4.0.0", + "http-signature": "~1.4.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.13.1", + "safe-buffer": "^5.1.2", + "tough-cookie": "^5.0.0", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", + "dev": true, + "dependencies": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@ethereumjs/rlp": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", @@ -199,66 +378,136 @@ } }, "node_modules/@honkit/asciidoc": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@honkit/asciidoc/-/asciidoc-4.0.8.tgz", - "integrity": "sha512-wyVBKfX9yM5P8nm81ew1cdTR0hKWFB9hRTvwGXBVS+ipD+WFTQWxVw3qNQapMKRiiVq/L3QA6bpkIDul3EJ43w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/asciidoc/-/asciidoc-6.0.2.tgz", + "integrity": "sha512-6lo5fhJUOQx7bRvfVZj4So8JTJeQR2a8rL5rQ1iozvkDe9/JFbpyV72wZxWDd9b/yaK0/5yflZUe0UNENQz9rg==", "dev": true, "dependencies": { - "@honkit/html": "^4.0.8", - "asciidoctor": "^2.2.0", - "lodash": "^4.13.1" + "@honkit/html": "6.0.2", + "asciidoctor": "^2.2.8", + "lodash": "^4.17.21" + } + }, + "node_modules/@honkit/honkit-plugin-fontsettings": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/honkit-plugin-fontsettings/-/honkit-plugin-fontsettings-6.0.2.tgz", + "integrity": "sha512-P2mj7/cDAIRkZCwFKhe3JNJw0rvcH6XKdc9xihKDJEI+w01fGT5ox/jnkY4UNz6kVfjDpriEr96e/OU2OCxNJQ==", + "dev": true, + "engines": { + "gitbook": ">=2.4.0" } }, "node_modules/@honkit/honkit-plugin-highlight": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@honkit/honkit-plugin-highlight/-/honkit-plugin-highlight-4.0.8.tgz", - "integrity": "sha512-fu1QFxS/m0X9uIK8vrn9TGN2HLJ8AjK03L4/yZo+ioYG55ALgTE3tNz7CrGPGjUn+uluLMmrvcJQDpPUmTMYdQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/honkit-plugin-highlight/-/honkit-plugin-highlight-6.0.2.tgz", + "integrity": "sha512-/9+Lkj8yLstTtZrwbjq530q2KZCRQZT6KWEI8d63vHnczuj6Mb6RmPXEeT4m4slxYgCdYn52ZskRMg9NKK+IlA==", "dev": true, "dependencies": { - "highlight.js": "^10.7.1" + "highlight.js": "^11.10.0" }, "engines": { "gitbook": ">=2.4.0" } }, "node_modules/@honkit/honkit-plugin-highlight/node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.10.0.tgz", + "integrity": "sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==", "dev": true, "engines": { - "node": "*" + "node": ">=12.0.0" } }, "node_modules/@honkit/honkit-plugin-theme-default": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@honkit/honkit-plugin-theme-default/-/honkit-plugin-theme-default-4.0.8.tgz", - "integrity": "sha512-1CaoaAZZYWOJGnBsdi63ulKqxNcHXAQZPq1QqUsxE3Ml+YJZnyf/0uq8wuUdxJ/TzG4iyaXA2jT92xHlCkXJ1w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/honkit-plugin-theme-default/-/honkit-plugin-theme-default-6.0.2.tgz", + "integrity": "sha512-7qxJQDO+MA+tvJvQOexe00m1jMQ4U3dKXYPI1beetZCXV951NTQjKqKr4vCWLbOYXTdu4DALNrOg3+OyTvACeQ==", "dev": true, "engines": { "gitbook": ">=3.0.0" } }, "node_modules/@honkit/html": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@honkit/html/-/html-4.0.8.tgz", - "integrity": "sha512-tpMpYrPKT3RqZC8i00oGHuY+BR+6S3stEONEpMQM9xz1Zj266TXZ5GRXkX4n2cb5DA6OmeR5asYxd7gTXNPjqw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/html/-/html-6.0.2.tgz", + "integrity": "sha512-28GlMEvBex9kfcqhKCDNJcBY+DV3XW2FLAJlcjuZO99SMktQe+4LDLNuoSi9mY+Z120Xwl92h7VBrXFJIY2bmA==", "dev": true, "dependencies": { - "cheerio": "^1.0.0-rc.12", - "lodash": "^4.13.1", - "q": "^1.1.2" + "cheerio": "^1.0.0", + "lodash": "^4.17.21", + "q": "^1.5.1" } }, "node_modules/@honkit/markdown-legacy": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@honkit/markdown-legacy/-/markdown-legacy-4.0.8.tgz", - "integrity": "sha512-DqLDDzFbyLuBVYDfrhl4b67LdcbmMzRR+U/DwvXOCc8PqNx6nQoLHnAOpLQN/UP4/P6e7mWaJN9iSjfzg4Q0MQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@honkit/markdown-legacy/-/markdown-legacy-6.0.2.tgz", + "integrity": "sha512-Fvn794bf0cA20dKHGzdLkYiT1PXPZKdrZGXRMroXtToSbE5iM+eZ5QDBPD197gMTDlpo7HHChoxRMo1aReUikQ==", "dev": true, "dependencies": { - "@honkit/html": "^4.0.8", + "@honkit/html": "6.0.2", "kramed": "0.5.6", - "lodash": "^4.13.1" + "lodash": "^4.17.21" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "dev": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@istanbuljs/schema": { @@ -280,9 +529,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -308,20 +557,20 @@ } }, "node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", "dependencies": { - "@noble/hashes": "1.3.3" + "@noble/hashes": "1.4.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/curves/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -330,41 +579,131 @@ } }, "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", "engines": { - "node": ">= 16" + "node": "^14.21.3 || >=16" }, "funding": { "url": "https://paulmillr.com/funding/" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.6.0.tgz", + "integrity": "sha512-aR0uffYI700OEEH4gYnitAnv3vzVGXCFvYfdpu/CJKvk4pHfLPEy/JSZyrpQ+15WhXe1yJRXLtfQ84s4mEXnPg==", + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/client/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/@redis/graph": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.1.tgz", + "integrity": "sha512-FEMTcTHZozZciLRl6GiiIB4zGm5z5F3F6a6FZCyrfxdKOhFlGkiAqlexWMBzCi4DcRoyiOsuLfW+cjlGWyExOw==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.7.tgz", + "integrity": "sha512-6UyXfjVaTBTJtKNG4/9Z8PSpKE6XgSyEb8iwaqDcy+uKrd/DGYHTWkUdnQDyzm727V7p21WUMhsqz5oy65kPcQ==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.2.0.tgz", + "integrity": "sha512-tYoDBbtqOVigEDMAcTGsRlMycIIjwMCgD8eR2t0NANeQmgK/lvxNAvYyb6bZDD4frHRhIHkJu2TBRvB0ERkOmw==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.1.0.tgz", + "integrity": "sha512-c1Q99M5ljsIuc4YdaCwfUEXsofakb9c8+Zse2qxTadu8TalLXuAESzLvFAvNVbkmSlvlzIQOLpBCmWI9wTOt+g==", + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, "node_modules/@scure/base": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.6.tgz", - "integrity": "sha512-ok9AWwhcgYuGG3Zfhyqg+zwl+Wn5uE+dwC0NV/2qQkx4dABbb/bx96vWu8NSj+BNjjSjno+JRYRjle1jV08k3g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", + "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.3.tgz", - "integrity": "sha512-LJaN3HwRbfQK0X1xFSi0Q9amqOgzQnnDngIt+ZlsBC3Bm7/nE7K0kwshZHyaru79yIVRv/e1mQAjZyuZG6jOFQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", "dependencies": { - "@noble/curves": "~1.3.0", - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -372,22 +711,30 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip32/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@scure/bip39": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.2.tgz", - "integrity": "sha512-HYf9TUXG80beW+hGAt3TRM8wU6pQoYur9iNypTROm42dorCGmLnFe3eWjz3gOq6G62H2WRh0FCzAR1PI+29zIA==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", "dependencies": { - "@noble/hashes": "~1.3.2", - "@scure/base": "~1.1.4" + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip39/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -395,6 +742,14 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@types/connect": { "version": "3.4.38", "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", @@ -403,12 +758,24 @@ "@types/node": "*" } }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, "node_modules/@types/linkify-it": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", @@ -432,9 +799,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "11.11.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", - "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, "node_modules/@types/ws": { "version": "7.4.7", @@ -456,26 +823,26 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, - "node_modules/abstract-leveldown": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-7.2.0.tgz", - "integrity": "sha512-DnhQwcFEaYsvYDnACLZhMmCWd3rkOeEvglpa4q5i/5Jlm3UIsWaxVzuXvDLFCSCWRO3yy2/+V/G7FusFgejnfQ==", + "node_modules/abstract-level": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-2.0.2.tgz", + "integrity": "sha512-pPJixmXk/kTKLB2sSue7o4Uj6TlLD2XfaP2gWZomHVCC6cuUGX/VslQqKG1yZHfXwBb/3lS6oSTMPGzh1P1iig==", "dependencies": { "buffer": "^6.0.3", - "catering": "^2.0.0", "is-buffer": "^2.0.5", - "level-concat-iterator": "^3.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" + "level-supports": "^6.0.0", + "level-transcoder": "^1.0.1", + "maybe-combine-errors": "^1.0.0", + "module-error": "^1.0.1" }, "engines": { - "node": ">=10" + "node": ">=16" } }, "node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -539,34 +906,27 @@ "node": ">=6" } }, - "node_modules/ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -582,20 +942,35 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, "node_modules/arbitrary": { "version": "1.4.10", "resolved": "https://registry.npmjs.org/arbitrary/-/arbitrary-1.4.10.tgz", "integrity": "sha512-YU4rMv5yk9GS/1e8pWgrhnWfnE3SaTnS17fcX2VEY2stilqL5++SI4nPAyF5RZkY2DWRkXy/i+Opl8XHBNvNSA==" }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "deprecated": "This package is no longer supported.", "dependencies": { - "sprintf-js": "~1.0.2" + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/array-back": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz", @@ -618,13 +993,13 @@ "dev": true }, "node_modules/asciidoctor": { - "version": "2.2.7", - "resolved": "https://registry.npmjs.org/asciidoctor/-/asciidoctor-2.2.7.tgz", - "integrity": "sha512-n8wj8HDTBjn+gXlWxPjMqbIa0qlqIP0TrbDebOniC9fygNnogztBBcEFqyfNZD8UF0krOnbfsnihJvFVRA8NfQ==", + "version": "2.2.8", + "resolved": "https://registry.npmjs.org/asciidoctor/-/asciidoctor-2.2.8.tgz", + "integrity": "sha512-G+sDYWnNo+QHRkIvN5k7ASbvrd2bHuNXHlZ83+PjVFYtl0//as5iebq+Bdf3aSwXrkM7akcEJPUpdTjjP0MgYw==", "dev": true, "dependencies": { "@asciidoctor/cli": "3.5.0", - "@asciidoctor/core": "2.2.7" + "@asciidoctor/core": "2.2.8" }, "bin": { "asciidoctor": "bin/asciidoctor", @@ -649,21 +1024,20 @@ "node": ">=8.11" } }, - "node_modules/asciidoctor-opal-runtime/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "engines": { - "node": "*" + "node": ">=0.8" } }, "node_modules/assertion-error": { @@ -675,25 +1049,38 @@ "node": "*" } }, - "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", "engines": { - "node": ">=4" + "node": "*" } }, - "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==", - "dev": true + "node_modules/aws4": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz", + "integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==" }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base-x": { "version": "1.1.0", @@ -751,15 +1138,28 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/bech32": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" }, "node_modules/bech32-buffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/bech32-buffer/-/bech32-buffer-0.2.0.tgz", - "integrity": "sha512-Ez8s82a+Xnn/m3/ftGaQJUSFG4EwNIj9adIJBw8OrHASQsXgvwLSducbcJ9El0rsrwJYJ71yBhC/hZzz3FPSCQ==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/bech32-buffer/-/bech32-buffer-0.2.1.tgz", + "integrity": "sha512-fCG1TyZuCN48Sdw97p/IR39fvqpFlWDVpG7qnuU1Uc3+Xtc/0uqAp8U7bMW/bGuVF5CcNVIXwxQsWwUr6un6FQ==", "engines": { "node": ">=8" } @@ -789,16 +1189,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/bip-schnorr": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/bip-schnorr/-/bip-schnorr-0.6.6.tgz", @@ -837,14 +1227,11 @@ } }, "node_modules/bip39": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.4.tgz", - "integrity": "sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.1.0.tgz", + "integrity": "sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A==", "dependencies": { - "@types/node": "11.11.6", - "create-hash": "^1.1.0", - "pbkdf2": "^3.0.9", - "randombytes": "^2.0.1" + "@noble/hashes": "^1.2.0" } }, "node_modules/bip65": { @@ -894,8 +1281,7 @@ "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/bn.js": { "version": "5.2.1", @@ -924,18 +1310,18 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -946,6 +1332,14 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, + "node_modules/browser-level": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-level/-/browser-level-2.0.0.tgz", + "integrity": "sha512-RuYSCHG/jwFCrK+KWA3dLSUNLKHEgIYhO5ORPjJMjCt7T3e+RzpIDmYKWRHxq2pfKGXjlRuEff7y7RESAAgzew==", + "dependencies": { + "abstract-level": "^2.0.1" + } + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -971,9 +1365,9 @@ } }, "node_modules/bs58check/node_modules/base-x": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.9.tgz", - "integrity": "sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==", + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.10.tgz", + "integrity": "sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==", "dependencies": { "safe-buffer": "^5.0.1" } @@ -1051,21 +1445,6 @@ "node": ">=10.12.0" } }, - "node_modules/c8/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/cache-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-2.0.0.tgz", @@ -1090,16 +1469,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" }, "engines": { "node": ">= 0.4" @@ -1108,6 +1485,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsite": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", @@ -1138,13 +1527,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/catering": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz", - "integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==", - "engines": { - "node": ">=6" - } + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, "node_modules/catharsis": { "version": "0.9.0", @@ -1176,25 +1562,21 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", @@ -1208,21 +1590,25 @@ } }, "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", + "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", "dev": true, "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" + "domutils": "^3.1.0", + "encoding-sniffer": "^0.2.0", + "htmlparser2": "^9.1.0", + "parse5": "^7.1.2", + "parse5-htmlparser2-tree-adapter": "^7.0.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^6.19.5", + "whatwg-mimetype": "^4.0.0" }, "engines": { - "node": ">= 6" + "node": ">=18.17" }, "funding": { "url": "https://github.com/cheeriojs/cheerio?sponsor=1" @@ -1295,32 +1681,52 @@ "fsevents": "~2.3.2" } }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/cipher-base": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", + "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", "dependencies": { - "restore-cursor": "^2.0.0" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1" }, "engines": { - "node": ">=4" + "node": ">= 0.10" } }, - "node_modules/cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true + "node_modules/classic-level": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-2.0.0.tgz", + "integrity": "sha512-ftiMvKgCQK+OppXcvMieDoYlYLYWhScK6yZRFBrrlHQRbm4k6Gr+yDgu/wt3V0k1/jtNbuiXAsRmuAFcD0Tx5Q==", + "hasInstallScript": true, + "dependencies": { + "abstract-level": "^2.0.0", + "module-error": "^1.0.1", + "napi-macros": "^2.2.2", + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=18" + } }, "node_modules/cliui": { "version": "7.0.4", @@ -1333,48 +1739,12 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/collect-all": { @@ -1391,20 +1761,42 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/command-line-args": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", @@ -1494,11 +1886,11 @@ } }, "node_modules/commander": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", - "integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "engines": { - "node": ">= 6" + "node": ">=18" } }, "node_modules/common-sequence": { @@ -1513,7 +1905,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/config-chain": { "version": "1.1.13", @@ -1543,6 +1936,11 @@ "node": ">=0.10.0" } }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" + }, "node_modules/content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", @@ -1564,9 +1962,9 @@ "dev": true }, "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/corser": { "version": "2.0.1", @@ -1607,7 +2005,20 @@ "minimist": "^1.2.6" }, "bin": { - "mkdirp": "bin/cmd.js" + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/cpr/node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" } }, "node_modules/crc": { @@ -1655,27 +2066,13 @@ "sha.js": "^2.4.0" } }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "node_modules/cross-env": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.1.3.tgz", - "integrity": "sha512-UOokgwvDzCT0mqRSLEkJzUhYXB1vK3E5UgDrD41QiXsm9UetcW2rCGHYz/O3p873lMJ1VZbFCF9Izkwh7nYR5A==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-5.2.1.tgz", + "integrity": "sha512-1yHhtcfAd1r4nwQgknowuUNfIT9E8dOMMspC36g45dN+iD1blloi7xp8X/xAIDnjHWyt1uQ8PHk2fkNaym7soQ==", "dev": true, "dependencies": { - "cross-spawn": "^5.1.0", - "is-windows": "^1.0.0" + "cross-spawn": "^6.0.5" }, "bin": { "cross-env": "dist/bin/cross-env.js", @@ -1686,22 +2083,27 @@ } }, "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", "dependencies": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.12" } }, "node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "dependencies": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "engines": { + "node": ">=4.8" } }, "node_modules/crypto-js": { @@ -1737,13 +2139,24 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1811,23 +2224,10 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/deferred-leveldown": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-7.0.0.tgz", - "integrity": "sha512-QKN8NtuS3BC6m0B8vAnBls44tX1WXAFATUsJlruyAYbZpysWV3siH6o/i3g9DCHauzodksO60bdj5NazNbjCmg==", - "dependencies": { - "abstract-leveldown": "^7.2.0", - "inherits": "^2.0.3" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -1851,14 +2251,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "engines": { - "node": ">=0.10" + "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, "node_modules/depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1897,17 +2302,17 @@ } }, "node_modules/dmd": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/dmd/-/dmd-6.2.0.tgz", - "integrity": "sha512-uXWxLF1H7TkUAuoHK59/h/ts5cKavm2LnhrIgJWisip4BVzPoXavlwyoprFFn2CzcahKYgvkfaebS6oxzgflkg==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/dmd/-/dmd-6.2.3.tgz", + "integrity": "sha512-SIEkjrG7cZ9GWZQYk/mH+mWtcRPly/3ibVuXO/tP/MFoWz6KiRK77tSMq6YQBPl7RljPtXPQ/JhxbNuCdi1bNw==", "dev": true, "dependencies": { "array-back": "^6.2.2", "cache-point": "^2.0.0", "common-sequence": "^2.0.2", "file-set": "^4.0.2", - "handlebars": "^4.7.7", - "marked": "^4.2.3", + "handlebars": "^4.7.8", + "marked": "^4.3.0", "object-get": "^2.1.1", "reduce-flatten": "^3.0.1", "reduce-unique": "^2.0.1", @@ -1959,18 +2364,6 @@ "node": ">= 12" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/dom-serializer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz", @@ -2055,9 +2448,62 @@ } }, "node_modules/dotparser": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dotparser/-/dotparser-0.3.0.tgz", - "integrity": "sha512-TfIlRRKpYFu/KwJq/dm+BWqb4KtwTO1XIwWMaElu/EF3s+r1FRNGIS2bzK0uuAQ+dd3TlJKaoSiHp8Y09Q0ZZA==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/dotparser/-/dotparser-1.1.1.tgz", + "integrity": "sha512-8ojhUts0HbLnXJgjTiJOddwVVBUk6hg4SJ5kGiuhzgK/f+y79TiWvICwx1oCWlVbBC8YI3nEaIQg9fjGYbGBXw==" + }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/duplexer2/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/duplexer2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/duplexer2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/duplexer2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } }, "node_modules/duplexify": { "version": "3.7.1", @@ -2102,19 +2548,13 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/eccrypto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/eccrypto/-/eccrypto-1.0.3.tgz", - "integrity": "sha512-YVxyqtW/aZPNgxzecq48K3C4t3A4+SFMIVKnKZvwGRNfDlqvs4JlY8/idp+qLDcN8BhRKbrYNxBMIa9DY1VVDQ==", - "dev": true, - "hasInstallScript": true, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", "dependencies": { - "elliptic": "^6.0.2", - "es6-promise": "^3.0.2", - "nan": "^2.1.0" - }, - "optionalDependencies": { - "secp256k1": "^2.0.4" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "node_modules/ecpair": { @@ -2167,9 +2607,9 @@ "dev": true }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.0.tgz", + "integrity": "sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==", "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", @@ -2181,15 +2621,14 @@ } }, "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", + "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/encodeurl": { "version": "1.0.2", @@ -2200,18 +2639,17 @@ "node": ">= 0.8" } }, - "node_modules/encoding-down": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-7.1.0.tgz", - "integrity": "sha512-ky47X5jP84ryk5EQmvedQzELwVJPjCgXDQZGeb9F6r4PdChByCGHTBrVcF3h8ynKVJ1wVbkxTsDC8zBROPypgQ==", + "node_modules/encoding-sniffer": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", + "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", + "dev": true, "dependencies": { - "abstract-leveldown": "^7.2.0", - "inherits": "^2.0.3", - "level-codec": "^10.0.0", - "level-errors": "^3.0.0" + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" }, - "engines": { - "node": ">=10" + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" } }, "node_modules/end-of-stream": { @@ -2239,13 +2677,9 @@ } }, "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "engines": { "node": ">= 0.4" } @@ -2254,16 +2688,14 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, "engines": { "node": ">= 0.4" } }, "node_modules/es6-promise": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.3.1.tgz", - "integrity": "sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==", - "dev": true + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "node_modules/es6-promisify": { "version": "5.0.0", @@ -2273,15 +2705,10 @@ "es6-promise": "^4.0.3" } }, - "node_modules/es6-promisify/node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" - }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -2306,138 +2733,178 @@ "dev": true }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.5", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", + "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^6.14.0 || ^8.10.0 || >=9.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "dependencies": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=4.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "node_modules/eslint/node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=6" + "node": ">= 8" } }, - "node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "node_modules/eslint/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/eslint/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "node_modules/eslint/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=4.8" + "node": ">=8" } }, - "node_modules/eslint/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "node_modules/eslint/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { - "minimist": "^1.2.6" + "isexe": "^2.0.0" }, "bin": { - "mkdirp": "bin/cmd.js" + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, "node_modules/espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "dependencies": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">=6.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -2454,9 +2921,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2465,15 +2932,6 @@ "node": ">=0.10" } }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2486,7 +2944,7 @@ "node": ">=4.0" } }, - "node_modules/esrecurse/node_modules/estraverse": { + "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", @@ -2495,15 +2953,6 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -2523,28 +2972,28 @@ } }, "node_modules/ethereum-bloom-filters": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.1.0.tgz", - "integrity": "sha512-J1gDRkLpuGNvWYzWslBQR9cDV4nd4kfvVTE/Wy4Kkm4yb3EYRSlyi0eB/inTsSTTVyA0+HyzHgbr95Fn/Z1fSw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.2.0.tgz", + "integrity": "sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==", "dependencies": { "@noble/hashes": "^1.4.0" } }, "node_modules/ethereum-cryptography": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.1.3.tgz", - "integrity": "sha512-BlwbIL7/P45W8FGW2r7LGuvoEZ+7PWsniMvQ4p5s2xCyw9tmaDlpfsN9HjAucbF+t/qpVHwZUisgfK24TCW8aA==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", "dependencies": { - "@noble/curves": "1.3.0", - "@noble/hashes": "1.3.3", - "@scure/bip32": "1.3.3", - "@scure/bip39": "1.2.2" + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" } }, "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -2587,34 +3036,15 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "node_modules/external-editor/node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] }, "node_modules/eyes": { "version": "0.1.8", @@ -2624,11 +3054,37 @@ "node": "> 0.1.90" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/fast-json-patch": { "version": "3.1.1", @@ -2647,6 +3103,14 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -2659,28 +3123,16 @@ "node": ">=0.4.0" } }, - "node_modules/figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=16.0.0" } }, "node_modules/file-set": { @@ -2705,18 +3157,31 @@ "node": ">=10" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "node_modules/file-set/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "optional": true + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2771,41 +3236,28 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": ">=4" - } - }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "node": ">=16" } }, "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "dev": true, "funding": [ { @@ -2841,9 +3293,9 @@ } }, "node_modules/foreground-child/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", @@ -2899,6 +3351,27 @@ "node": ">= 8" } }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -2917,11 +3390,32 @@ "js-yaml": "^3.10.0" } }, + "node_modules/front-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/front-matter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/fs-extra": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", - "dev": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -2931,6 +3425,17 @@ "node": ">=12" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/fs-then-native": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", @@ -2943,7 +3448,8 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true }, "node_modules/fsevents": { "version": "2.3.3", @@ -2967,16 +3473,30 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, "node_modules/generate-function": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "dev": true, "dependencies": { "is-property": "^1.0.2" } @@ -2985,10 +3505,19 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz", "integrity": "sha512-TuOwZWgJ2VAMEGJvAyPWvpqxSANF0LDpmyHauMjFYzaACvn+QTT/AZomvPCzVBV7yDN3OmwHQ5OvHaeLKre3JQ==", + "dev": true, "dependencies": { "is-property": "^1.0.0" } }, + "node_modules/generic-pool": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", + "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==", + "engines": { + "node": ">= 4" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -3008,16 +3537,18 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.5.tgz", + "integrity": "sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg==", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -3026,13 +3557,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gitbook-plugin-fontsettings": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gitbook-plugin-fontsettings/-/gitbook-plugin-fontsettings-2.0.0.tgz", - "integrity": "sha512-bZpz/Jev7lL1d3VNp41KHZD67UYqyqdOwbsJE6YEW93R2mGiLfZLpUs86d2nrY61BedhlNck1xF52FNT6sWeig==", - "dev": true, - "engines": { - "gitbook": ">=2.4.0" + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" } }, "node_modules/gitbook-plugin-livereload": { @@ -3074,65 +3604,53 @@ "dev": true }, "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.1.1", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" }, "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-run": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/glob-run/-/glob-run-0.1.7.tgz", - "integrity": "sha512-8zLtPFAhK1kL6nghJfwDW5LEggkEXJxsq+bvTzwiluAjvGCIoyi3grpWs0dESSPqYOJ/184oIYqT3+szTqwyjw==", - "dev": true, - "dependencies": { - "async": "^3.1.0", - "glob": "^7.1.4" - }, - "bin": { - "glob-run": "bin/glob-run" + "node": ">=10.13.0" } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3141,8 +3659,7 @@ "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" }, "node_modules/handlebars": { "version": "4.7.8", @@ -3166,19 +3683,18 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-property-descriptors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, "dependencies": { "es-define-property": "^1.0.0" }, @@ -3186,23 +3702,10 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "engines": { "node": ">= 0.4" }, @@ -3210,6 +3713,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "node_modules/hash-base": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", @@ -3272,66 +3780,76 @@ } }, "node_modules/honkit": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/honkit/-/honkit-4.0.7.tgz", - "integrity": "sha512-E6+OQ+vrR7Ig2cJyoNwnYtmRQQD/IzPgZJwlv9gmYQ5OIc6DfpcuS32f2Dfwis5AVMa7nwKcpmwO07e+X2JFUw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/honkit/-/honkit-6.0.2.tgz", + "integrity": "sha512-5vV0jIyRHCigmvq0AVlgNenfNHdtOiaPK3L8N22NywBXNdrqszCEikhROKMWlqMB9CjpONXNcPu8Fj9tdnlYtQ==", "dev": true, "dependencies": { - "@honkit/asciidoc": "^4.0.7", - "@honkit/honkit-plugin-highlight": "^4.0.7", - "@honkit/honkit-plugin-theme-default": "^4.0.7", - "@honkit/markdown-legacy": "^4.0.7", + "@honkit/asciidoc": "6.0.2", + "@honkit/honkit-plugin-fontsettings": "6.0.2", + "@honkit/honkit-plugin-highlight": "6.0.2", + "@honkit/honkit-plugin-theme-default": "6.0.2", + "@honkit/html": "6.0.2", + "@honkit/markdown-legacy": "6.0.2", "bash-color": "^0.0.4", - "cheerio": "^1.0.0-rc.12", - "chokidar": "^3.3.0", + "cheerio": "^1.0.0", + "chokidar": "^3.6.0", "commander": "^5.1.0", "cp": "^0.2.0", "cpr": "^3.0.1", "crc": "^3.8.0", - "destroy": "^1.0.4", + "destroy": "^1.2.0", "direction": "^0.1.5", - "dom-serializer": "^0.1.0", + "dom-serializer": "^0.1.1", "error": "7.0.2", "escape-html": "^1.0.3", "escape-string-regexp": "^4.0.0", - "extend": "^3.0.0", + "extend": "^3.0.2", "flat-cache": "^2.0.1", - "front-matter": "^2.1.0", - "gitbook-plugin-fontsettings": "^2.0.0", + "front-matter": "^2.3.0", "gitbook-plugin-livereload": "^0.0.1", "gitbook-plugin-lunr": "^1.2.0", "gitbook-plugin-search": "^2.2.1", "github-slugid": "^1.0.1", "i18n-t": "^1.0.1", - "ignore": "^5.1.8", - "immutable": "^3.8.1", - "is": "^3.1.0", - "js-yaml": "^3.6.1", + "ignore": "^5.3.2", + "immutable": "^3.8.2", + "is": "^3.3.0", + "js-yaml": "^3.14.1", "json-schema-defaults": "^0.1.1", "jsonschema": "1.1.0", - "juice": "^8.0.0", + "juice": "^8.1.0", "lru_map": "^0.4.1", - "memoize-one": "^5.1.1", + "memoize-one": "^5.2.1", "mkdirp": "^1.0.4", - "moment": "^2.24.0", - "nunjucks": "^3.2.0", + "moment": "^2.30.1", + "nunjucks": "^3.2.4", "nunjucks-do": "^1.0.0", - "object-path": "^0.11.5", + "object-path": "^0.11.8", "omit-keys": "^0.1.0", - "open": "^7.0.0", + "open": "^7.4.2", "q": "^1.5.1", - "resolve": "^1.17.0", - "semver": "^5.1.0", - "send": "^0.17.1", + "resolve": "^1.22.8", + "semver": "^7.6.3", + "send": "^0.17.2", "tiny-lr": "^1.1.1", "tmp": "0.0.28", "try-resolve": "^1.0.1", - "urijs": "^1.19.6" + "urijs": "^1.19.11" }, "bin": { "honkit": "bin/honkit.js" } }, + "node_modules/honkit/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, "node_modules/honkit/node_modules/commander": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", @@ -3341,25 +3859,62 @@ "node": ">= 6" } }, - "node_modules/honkit/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/honkit/node_modules/flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dev": true, + "dependencies": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, "engines": { - "node": ">=10" + "node": ">=4" + } + }, + "node_modules/honkit/node_modules/flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "node_modules/honkit/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/honkit/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" } }, - "node_modules/honkit/node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "node_modules/honkit/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "bin": { + "semver": "bin/semver.js" + }, "engines": { - "node": ">= 4" + "node": ">=10" } }, "node_modules/html-encoding-sniffer": { @@ -3374,6 +3929,18 @@ "node": ">=12" } }, + "node_modules/html-encoding-sniffer/node_modules/whatwg-encoding": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", + "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "dev": true, + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/html-entities": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.0.tgz", @@ -3390,9 +3957,9 @@ "dev": true }, "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -3404,8 +3971,8 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "domutils": "^3.1.0", + "entities": "^4.5.0" } }, "node_modules/htmlparser2/node_modules/entities": { @@ -3484,74 +4051,17 @@ "node": ">=12" } }, - "node_modules/http-server/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/http-server/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/http-server/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/http-server/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/http-server/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/http-server/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, + "node_modules/http-signature": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.4.0.tgz", + "integrity": "sha512-G5akfn7eKbpDN+8nPS/cb57YeA1jLTVxjpCj7tmm3QKPdyDy7T+qSC40e9ptydSWvkwjSXw1VbkpyEm39ukeAg==", "dependencies": { - "has-flag": "^4.0.0" + "assert-plus": "^1.0.0", + "jsprim": "^2.0.2", + "sshpk": "^1.18.0" }, "engines": { - "node": ">=8" + "node": ">=0.10" } }, "node_modules/i18n-t": { @@ -3564,12 +4074,12 @@ } }, "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" @@ -3595,9 +4105,9 @@ ] }, "node_modules/ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -3641,6 +4151,8 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3657,59 +4169,6 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "node_modules/inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", - "dev": true, - "dependencies": { - "ansi-escapes": "^3.2.0", - "chalk": "^2.4.2", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.3", - "figures": "^2.0.0", - "lodash": "^4.17.12", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.4.0", - "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz", @@ -3754,11 +4213,14 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3783,25 +4245,22 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -3821,12 +4280,14 @@ "node_modules/is-my-ip-valid": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.1.tgz", - "integrity": "sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==" + "integrity": "sha512-jxc8cBcOWbNK2i2aTkCZP6i7wkHF1bqKFrwEHuN5Jtg5BSaZHUZQ/JTOJwoV41YvHnOaRyWWh72T/KvfNz9DJg==", + "dev": true }, "node_modules/is-my-json-valid": { "version": "2.20.6", "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.20.6.tgz", "integrity": "sha512-1JQwulVNjx8UqkPE/bqDaxtH4PXCe/2VRh/y3p99heOV87HG4Id5/VfDswd+YiAfHcRTfDlWgISycnHuhZq1aw==", + "dev": true, "dependencies": { "generate-function": "^2.0.0", "generate-object-property": "^1.1.0", @@ -3839,7 +4300,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, "engines": { "node": ">=0.12.0" } @@ -3856,7 +4316,13 @@ "node_modules/is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==" + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "dev": true + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -3870,15 +4336,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-wsl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", @@ -3918,6 +4375,11 @@ "ws": "*" } }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -3941,27 +4403,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", @@ -3981,9 +4422,9 @@ "integrity": "sha512-BwhYxQ1OPenBPXC735RgfB+ZUG8H3kjsx8hrYTgWnoy6TPipEy4fiicyhT2lxRKAXq9pG7CfFT8a2HLr6Hmwxg==" }, "node_modules/jayson": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.0.0.tgz", - "integrity": "sha512-v2RNpDCMu45fnLzSk47vx7I+QUaOsox6f5X0CUlabAFwxoP+8MfAY0NQRFwOEYXIxm8Ih5y6OaEa5KYiQMkyAA==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/jayson/-/jayson-4.1.2.tgz", + "integrity": "sha512-5nzMWDHy6f+koZOuYsArh2AXs73NfWYVlFyJJuCedr93GpY+Ku8qq10ropSXVfHK+H0T6paA88ww+/dV+1fBNA==", "dependencies": { "@types/connect": "^3.4.33", "@types/node": "^12.12.54", @@ -3996,7 +4437,7 @@ "json-stringify-safe": "^5.0.1", "JSONStream": "^1.3.5", "uuid": "^8.3.2", - "ws": "^7.4.5" + "ws": "^7.5.10" }, "bin": { "jayson": "bin/jayson.js" @@ -4005,11 +4446,6 @@ "node": ">=8" } }, - "node_modules/jayson/node_modules/@types/node": { - "version": "12.20.55", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", - "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" - }, "node_modules/jayson/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -4040,20 +4476,13 @@ "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz", "integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA==" }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" @@ -4068,6 +4497,11 @@ "xmlcreate": "^2.0.4" } }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, "node_modules/jsdoc": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", @@ -4118,21 +4552,37 @@ } }, "node_modules/jsdoc-parse": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.2.1.tgz", - "integrity": "sha512-9viGRUUtWOk/G4V0+nQ6rfLucz5plxh5I74WbNSNm9h9NWugCDVX4jbG8hZP9QqKGpdTPDE+qJXzaYNos3wqTA==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.2.4.tgz", + "integrity": "sha512-MQA+lCe3ioZd0uGbyB3nDCDZcKgKC7m/Ivt0LgKZdUoOlMJxUWJQ3WI6GeyHp9ouznKaCjlp7CU9sw5k46yZTw==", "dev": true, "dependencies": { "array-back": "^6.2.2", + "find-replace": "^5.0.1", "lodash.omit": "^4.5.0", - "reduce-extract": "^1.0.0", - "sort-array": "^4.1.5", - "test-value": "^3.0.0" + "sort-array": "^5.0.0" }, "engines": { "node": ">=12" } }, + "node_modules/jsdoc-parse/node_modules/find-replace": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-5.0.2.tgz", + "integrity": "sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q==", + "dev": true, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "@75lb/nature": "latest" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } + } + }, "node_modules/jsdoc-to-markdown": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-7.1.1.tgz", @@ -4163,17 +4613,11 @@ "node": ">=8" } }, - "node_modules/jsdoc/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true }, "node_modules/json-pointer": { "version": "0.6.2", @@ -4183,6 +4627,11 @@ "foreach": "^2.0.4" } }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, "node_modules/json-schema-defaults": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.1.1.tgz", @@ -4219,7 +4668,6 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, "dependencies": { "universalify": "^2.0.0" }, @@ -4267,6 +4715,20 @@ "node": "*" } }, + "node_modules/jsprim": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, "node_modules/juice": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/juice/-/juice-8.1.0.tgz", @@ -4323,6 +4785,15 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/juice/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, "node_modules/juice/node_modules/css-select": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", @@ -4425,11 +4896,14 @@ "parse5": "^6.0.1" } }, - "node_modules/juice/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } }, "node_modules/klaw": { "version": "3.0.0", @@ -4492,134 +4966,50 @@ } }, "node_modules/level": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/level/-/level-7.0.1.tgz", - "integrity": "sha512-w3E64+ALx2eZf8RV5JL4kIcE0BFAvQscRYd1yU4YVqZN9RGTQxXSvH202xvK15yZwFFxRXe60f13LJjcJ//I4Q==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/level/-/level-9.0.0.tgz", + "integrity": "sha512-n+mVuf63mUEkd8NUx7gwxY+QF5vtkibv6fXTGUgtHWLPDaA5/XZjLcI/Q1nQ8k6OttHT6Ezt+7nSEXsRUfHtOQ==", "dependencies": { - "level-js": "^6.1.0", - "level-packager": "^6.0.1", - "leveldown": "^6.1.0" + "abstract-level": "^2.0.1", + "browser-level": "^2.0.0", + "classic-level": "^2.0.0" }, "engines": { - "node": ">=10.12.0" + "node": ">=18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/level" } }, - "node_modules/level-codec": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-10.0.0.tgz", - "integrity": "sha512-QW3VteVNAp6c/LuV6nDjg7XDXx9XHK4abmQarxZmlRSDyXYk20UdaJTSX6yzVvQ4i0JyWSB7jert0DsyD/kk6g==", - "dependencies": { - "buffer": "^6.0.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/level-concat-iterator": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-3.1.0.tgz", - "integrity": "sha512-BWRCMHBxbIqPxJ8vHOvKUsaO0v1sLYZtjN3K2iZJsRBYtp+ONsY6Jfi6hy9K3+zolgQRryhIn2NRZjZnWJ9NmQ==", - "dependencies": { - "catering": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/level-errors": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-3.0.1.tgz", - "integrity": "sha512-tqTL2DxzPDzpwl0iV5+rBCv65HWbHp6eutluHNcVIftKZlQN//b6GEnZDM2CvGZvzGYMwyPtYppYnydBQd2SMQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/level-iterator-stream": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-5.0.0.tgz", - "integrity": "sha512-wnb1+o+CVFUDdiSMR/ZymE2prPs3cjVLlXuDeSq9Zb8o032XrabGEXcTCsBxprAtseO3qvFeGzh6406z9sOTRA==", - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/level-js": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/level-js/-/level-js-6.1.0.tgz", - "integrity": "sha512-i7mPtkZm68aewfv0FnIUWvFUFfoyzIvVKnUmuQGrelEkP72vSPTaA1SGneWWoCV5KZJG4wlzbJLp1WxVNGuc6A==", - "dependencies": { - "abstract-leveldown": "^7.2.0", - "buffer": "^6.0.3", - "inherits": "^2.0.3", - "ltgt": "^2.1.2", - "run-parallel-limit": "^1.1.0" - } - }, - "node_modules/level-packager": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-6.0.1.tgz", - "integrity": "sha512-8Ezr0XM6hmAwqX9uu8IGzGNkWz/9doyPA8Oo9/D7qcMI6meJC+XhIbNYHukJhIn8OGdlzQs/JPcL9B8lA2F6EQ==", - "dependencies": { - "encoding-down": "^7.1.0", - "levelup": "^5.1.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/level-supports": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-2.1.0.tgz", - "integrity": "sha512-E486g1NCjW5cF78KGPrMDRBYzPuueMZ6VBXHT6gC7A8UYWGiM14fGgp+s/L1oFfDWSPV/+SFkYCmZ0SiESkRKA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/leveldown": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-6.1.1.tgz", - "integrity": "sha512-88c+E+Eizn4CkQOBHwqlCJaTNEjGpaEIikn1S+cINc5E9HEvJ77bqY4JY/HxT5u0caWqsc3P3DcFIKBI1vHt+A==", - "hasInstallScript": true, - "dependencies": { - "abstract-leveldown": "^7.2.0", - "napi-macros": "~2.0.0", - "node-gyp-build": "^4.3.0" - }, + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-6.0.0.tgz", + "integrity": "sha512-UU226PsfiFWLRPmuqgB3eADtvZM8WYv+aCnAl93B/2Ca+vgn9+b7o2boA7yOY2ri7Kk5Wk4aHxl3eNimpYZnxw==", "engines": { - "node": ">=10.12.0" + "node": ">=16" } }, - "node_modules/levelup": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-5.1.1.tgz", - "integrity": "sha512-0mFCcHcEebOwsQuk00WJwjLI6oCjbBuEYdh/RaRqhjnyVlzqf41T1NnDtCedumZ56qyIh8euLFDqV1KfzTAVhg==", + "node_modules/level-transcoder": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz", + "integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==", "dependencies": { - "catering": "^2.0.0", - "deferred-leveldown": "^7.0.0", - "level-errors": "^3.0.1", - "level-iterator-stream": "^5.0.0", - "level-supports": "^2.0.1", - "queue-microtask": "^1.2.3" + "buffer": "^6.0.3", + "module-error": "^1.0.1" }, "engines": { - "node": ">=10" + "node": ">=12" } }, "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -4658,8 +5048,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.camelcase": { "version": "4.3.0", @@ -4700,76 +5089,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/log-symbols/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/log-symbols/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/log-symbols/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/log-symbols/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lru_map": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.4.1.tgz", @@ -4786,11 +5105,6 @@ "yallist": "^2.1.2" } }, - "node_modules/ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==" - }, "node_modules/lunr": { "version": "0.5.12", "resolved": "https://registry.npmjs.org/lunr/-/lunr-0.5.12.tgz", @@ -4823,9 +5137,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4860,12 +5174,6 @@ "markdown-it": "*" } }, - "node_modules/markdown-it/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/markdown-it/node_modules/entities": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", @@ -4887,6 +5195,14 @@ "node": ">= 12" } }, + "node_modules/maybe-combine-errors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/maybe-combine-errors/-/maybe-combine-errors-1.0.0.tgz", + "integrity": "sha512-eefp6IduNPT6fVdwPp+1NgD0PML1NU5P6j1Mj5nz1nidX8/sWY7119WL8vTAHgqfsY74TzW0w1XPgdYEKkGZ5A==", + "engines": { + "node": ">=10" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -4909,16 +5225,32 @@ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", "dev": true }, + "node_modules/memory-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/memory-stream/-/memory-stream-1.0.0.tgz", + "integrity": "sha512-Wm13VcsPIMdG96dzILfij09PvuS3APtcKNh7M28FsCA/w6+1mjR7hhPmfFNoilX9xU7wTdhsH5lJAm6XNzdtww==", + "dependencies": { + "readable-stream": "^3.4.0" + } + }, "node_modules/mensch": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/mensch/-/mensch-0.3.4.tgz", "integrity": "sha512-IAeFvcOnV9V0Yk+bFhYR07O3yNina9ANIN5MoXBKYJ/RLYPurd2d0yw14MDhpr9/momp0WofT1bPUh3hkzdi/g==", "dev": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, "node_modules/merkletreejs": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.3.11.tgz", - "integrity": "sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/merkletreejs/-/merkletreejs-0.4.0.tgz", + "integrity": "sha512-a48Ta5kWiVNBgeEbZVMm6FB1hBlp6vEuou/XnZdlkmd2zq6NZR6Sh2j+kR1B0iOZIXrTMcigBYzZ39MLdYhm1g==", "dependencies": { "bignumber.js": "^9.0.1", "buffer-reverse": "^1.0.1", @@ -4935,6 +5267,18 @@ "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==" }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", @@ -4947,13 +5291,23 @@ "node": ">=4" } }, - "node_modules/mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "engines": { - "node": ">=4" + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" } }, "node_modules/minimalistic-assert": { @@ -4970,6 +5324,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4981,10 +5336,44 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/minsc": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/minsc/-/minsc-0.2.0.tgz", @@ -5047,12 +5436,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, "node_modules/mocha/node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -5080,22 +5463,34 @@ "fsevents": "~2.3.2" } }, - "node_modules/mocha/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/mocha/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, + "dependencies": { + "ms": "2.1.2" + }, "engines": { - "node": ">=10" + "node": ">=6.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, + "node_modules/mocha/node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/mocha/node_modules/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", @@ -5112,6 +5507,18 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mocha/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/mocha/node_modules/glob/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5124,27 +5531,6 @@ "node": "*" } }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -5166,24 +5552,6 @@ "balanced-match": "^1.0.0" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -5208,6 +5576,14 @@ "node": ">=10" } }, + "node_modules/module-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz", + "integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==", + "engines": { + "node": ">=10" + } + }, "node_modules/moment": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", @@ -5218,21 +5594,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "node_modules/nan": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", - "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/nanoid": { @@ -5248,9 +5612,9 @@ } }, "node_modules/napi-macros": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", - "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz", + "integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -5271,17 +5635,17 @@ "dev": true }, "node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.3.0.tgz", + "integrity": "sha512-8VOpLHFrOQlAH+qA0ZzuGRlALRA6/LVh8QJldbrC4DY0hXoMP0l4Acq8TzFC018HztWiRqyCEj2aTWY2UvnJUg==", "engines": { - "node": "^16 || ^18 || >= 20" + "node": "^18 || ^20 || >= 21" } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -5298,15 +5662,20 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", "node-gyp-build-test": "build-test.js" } }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==" + }, "node_modules/noise-protocol-stream": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/noise-protocol-stream/-/noise-protocol-stream-1.1.3.tgz", @@ -5343,6 +5712,21 @@ "node": ">=0.10.0" } }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", @@ -5429,10 +5813,12 @@ "dev": true }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", - "dev": true, + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5488,18 +5874,6 @@ "wrappy": "1" } }, - "node_modules/onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/open": { "version": "7.4.2", "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", @@ -5526,17 +5900,17 @@ } }, "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -5594,24 +5968,36 @@ } }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", "dev": true, "dependencies": { - "entities": "^4.4.0" + "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" } }, "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "dev": true, + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", "dev": true, "dependencies": { - "domhandler": "^5.0.2", "parse5": "^7.0.0" }, "funding": { @@ -5643,15 +6029,10 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true + "node": ">=0.10.0" + } }, "node_modules/path-key": { "version": "2.0.1", @@ -5677,9 +6058,9 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", + "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", "dependencies": { "isarray": "0.0.1" } @@ -5693,32 +6074,15 @@ "node": "*" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", - "dev": true + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, "engines": { "node": ">=8.6" }, @@ -5748,15 +6112,6 @@ "node": ">= 0.12.0" } }, - "node_modules/portfinder/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, "node_modules/portfinder/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -5779,9 +6134,9 @@ } }, "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -5792,15 +6147,6 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", @@ -5826,6 +6172,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", + "deprecated": "You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.\n\n(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)", "dev": true, "engines": { "node": ">=0.6.0", @@ -5833,10 +6180,9 @@ } }, "node_modules/qs": { - "version": "6.12.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz", - "integrity": "sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==", - "dev": true, + "version": "6.13.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", + "integrity": "sha512-EJPeIn0CYrGu+hli1xilKAPXODtJ12T0sP63Ijx2/khC2JtuaN3JyNIpvmnkmaEtha9ocbG4A4cMcr+TvqvwQg==", "dependencies": { "side-channel": "^1.0.6" }, @@ -5927,94 +6273,17 @@ "node": ">=8.10.0" } }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/redis": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz", - "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==", - "dependencies": { - "denque": "^1.5.0", - "redis-commands": "^1.7.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-redis" - } - }, - "node_modules/redis-commands": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", - "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==" - }, - "node_modules/redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==", - "engines": { - "node": ">=4" - } - }, - "node_modules/redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha512-DJnGAeenTdpMEH6uAJRK/uiyEIH9WVsUmoLwzudwGJUwZPp80PDBWPHXSAGNPwNvIXAbe7MSUB1zQFugFml66A==", - "dependencies": { - "redis-errors": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/reduce-extract": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", - "integrity": "sha512-QF8vjWx3wnRSL5uFMyCjDeDc5EBMiryoT9tz94VvgjKfzecHAVnqmXAwQDcr7X4JmLc2cjkjFGCVzhMqDjgR9g==", - "dev": true, + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.7.0.tgz", + "integrity": "sha512-zvmkHEAdGMn+hMRXuMBtu4Vo5P6rHQjLoHftu+lBqq8ZTA3RCVC/WzD790bkKKiNFp7d5/9PcSD19fJyyRvOdQ==", "dependencies": { - "test-value": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/reduce-extract/node_modules/array-back": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", - "integrity": "sha512-1WxbZvrmyhkNoeYcizokbmh5oiOCIfyvGtcqbK3Ls1v1fKcquzxnQSceOx6tzq7jmai2kFLWIpGND2cLhH6TPw==", - "dev": true, - "dependencies": { - "typical": "^2.6.0" - }, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/reduce-extract/node_modules/test-value": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", - "integrity": "sha512-wrsbRo7qP+2Je8x8DsK8ovCGyxe3sYfQwOraIY/09A2gFXU9DYKiTF14W4ki/01AEh56kMzAmlj9CaHGDDUBJA==", - "dev": true, - "dependencies": { - "array-back": "^1.0.2", - "typical": "^2.4.2" - }, - "engines": { - "node": ">=0.10.0" + "@redis/bloom": "1.2.0", + "@redis/client": "1.6.0", + "@redis/graph": "1.1.1", + "@redis/json": "1.0.7", + "@redis/search": "1.2.0", + "@redis/time-series": "1.1.0" } }, "node_modules/reduce-flatten": { @@ -6072,15 +6341,6 @@ "node": ">=0.10.0" } }, - "node_modules/regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true, - "engines": { - "node": ">=6.5.0" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6130,28 +6390,29 @@ "node": ">=4" } }, - "node_modules/restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "dependencies": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "engines": { - "node": ">=4" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, "node_modules/rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, "dependencies": { - "glob": "^7.0.5" + "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/ripemd160": { @@ -6163,19 +6424,10 @@ "inherits": "^2.0.1" } }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/run-parallel-limit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/run-parallel-limit/-/run-parallel-limit-1.1.0.tgz", - "integrity": "sha512-jJA7irRNM91jaKc3Hcl1npHsFLOXOoTkPCUL1JEa1R82O2miplXXRaGdjW/KM/98YQWDhJLiSs793CnXfblJUw==", + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "funding": [ { "type": "github", @@ -6194,18 +6446,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "npm": ">=2.0.0" - } - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -6234,31 +6474,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/secp256k1": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/secp256k1/-/secp256k1-2.0.10.tgz", - "integrity": "sha512-MvcTiCwsuhEXkk1qyaP9Zy9bw4L7wp6jYTKGAPHZ4LNC041Gr0OMhGZATQdTpFYVhoVZ6It4aKfsw8N19o8uqw==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "dependencies": { - "bindings": "^1.2.1", - "bluebird": "^3.0.2", - "bn.js": "^4.6.4", - "elliptic": "^6.0.2", - "nan": "^2.0.9", - "object-assign": "^4.0.1" - } - }, - "node_modules/secp256k1/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true, - "optional": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/secure-compare": { "version": "3.0.1", @@ -6336,12 +6552,6 @@ "node": ">= 0.6" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -6351,11 +6561,15 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -6407,42 +6621,10 @@ "node": ">=0.10.0" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shx": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", - "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", - "dependencies": { - "minimist": "^1.2.3", - "shelljs": "^0.8.5" - }, - "bin": { - "shx": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/side-channel": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", - "dev": true, "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", @@ -6465,8 +6647,7 @@ "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/simple-aes": { "version": "0.1.1", @@ -6481,20 +6662,6 @@ "node": "*" } }, - "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/slick": { "version": "1.12.2", "resolved": "https://registry.npmjs.org/slick/-/slick-1.12.2.tgz", @@ -6505,34 +6672,33 @@ } }, "node_modules/sort-array": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-4.1.5.tgz", - "integrity": "sha512-Ya4peoS1fgFN42RN1REk2FgdNOeLIEMKFGJvs7VTP3OklF8+kl2SkpVliZ4tk/PurWsrWRsdNdU+tgyOBkB9sA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-5.0.0.tgz", + "integrity": "sha512-Sg9MzajSGprcSrMIxsXyNT0e0JB47RJRfJspC+7co4Z5BdNsNl8FmWI+lXEpyKq+vkMG6pHgAhqyCO+bkDTfFQ==", "dev": true, "dependencies": { - "array-back": "^5.0.0", - "typical": "^6.0.1" + "array-back": "^6.2.2", + "typical": "^7.1.1" }, "engines": { - "node": ">=10" - } - }, - "node_modules/sort-array/node_modules/array-back": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", - "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", - "dev": true, - "engines": { - "node": ">=10" + "node": ">=12.17" + }, + "peerDependencies": { + "@75lb/nature": "^0.1.1" + }, + "peerDependenciesMeta": { + "@75lb/nature": { + "optional": true + } } }, "node_modules/sort-array/node_modules/typical": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/typical/-/typical-6.0.1.tgz", - "integrity": "sha512-+g3NEp7fJLe9DPa1TArHm9QAA7YciZmWnfAqEaFrBihQ7epOv9i99rjtgb6Iz0wh3WuQDjsCTDfgRoGnmHN81A==", + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-7.3.0.tgz", + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.17" } }, "node_modules/source-map": { @@ -6544,12 +6710,46 @@ "node": ">=0.10.0" } }, + "node_modules/splitargs2": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/splitargs2/-/splitargs2-0.1.3.tgz", + "integrity": "sha512-7Lt7+Z0YwyhFCbhkXMI3AT5qLcH6rKZgWnmlk0+R4ObjqhTZ3kGB4VMTerMuTmMayJnAuDHYTSomAYtlYq0vbg==" + }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "dev": true }, + "node_modules/sshpk": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sshpk/node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -6562,6 +6762,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", "integrity": "sha512-68Kl+79cE0RGKemKkhxTSg8+6AGrqBt+cbZAXevg2iJ6Y3zX4JhA/sZeGzLpxW9cXhmqAcE7KnJCisUmIUfnFQ==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dev": true, "dependencies": { "array-back": "^1.0.2" @@ -6620,28 +6821,27 @@ "dev": true }, "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-hex-prefix": { @@ -6657,12 +6857,15 @@ } }, "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/struct": { @@ -6674,15 +6877,15 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -6696,21 +6899,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", - "dev": true, - "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/table-layout": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", @@ -6739,47 +6927,35 @@ "node": ">=4" } }, - "node_modules/table/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/table/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/table/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" }, "engines": { - "node": ">=6" + "node": ">=10" } }, - "node_modules/table/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "engines": { - "node": ">=6" + "node": ">=8" } }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/temp-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", @@ -6800,6 +6976,27 @@ "node": ">=8" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/test-value": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", @@ -6825,12 +7022,6 @@ "node": ">=4" } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -6901,9 +7092,9 @@ } }, "node_modules/tiny-secp256k1": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-2.2.1.tgz", - "integrity": "sha512-/U4xfVqnVxJXN4YVsru0E6t5wVncu2uunB8+RVR40fYUxkKYUPS10f+ePQZgFBoE/Jbf9H1NBveupF2VmB58Ng==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/tiny-secp256k1/-/tiny-secp256k1-2.2.3.tgz", + "integrity": "sha512-SGcL07SxcPN2nGKHTCvRMkQLYPSoeFcvArUSCYtjVARiFAWU44cCIqYS0mYAU6nY7XfvwURuTIGo2Omt3ZQr0Q==", "dependencies": { "uint8array-tools": "0.0.7" }, @@ -6911,6 +7102,22 @@ "node": ">=14.0.0" } }, + "node_modules/tldts": { + "version": "6.1.66", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.66.tgz", + "integrity": "sha512-l3ciXsYFel/jSRfESbyKYud1nOw7WfhrBEF9I3UiarYk/qEaOOwu3qXNECHw4fHGHGTEOuhf/VdKgoDX5M/dhQ==", + "dependencies": { + "tldts-core": "^6.1.66" + }, + "bin": { + "tldts": "bin/cli.js" + } + }, + "node_modules/tldts-core": { + "version": "6.1.66", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.66.tgz", + "integrity": "sha512-s07jJruSwndD2X8bVjwioPfqpIc1pDTzszPe9pL1Skbh4bjytL85KNQ3tolqLbCvpQHawIsGfFi9dgerWjqW4g==" + }, "node_modules/tmp": { "version": "0.0.28", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz", @@ -6927,7 +7134,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -6944,6 +7150,17 @@ "node": ">=0.6" } }, + "node_modules/tough-cookie": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", + "integrity": "sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==", + "dependencies": { + "tldts": "^6.1.32" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -6965,11 +7182,22 @@ "dev": true }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/tweetnacl": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", @@ -6981,21 +7209,21 @@ "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" }, "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true, "engines": { "node": ">=4" @@ -7019,9 +7247,9 @@ "dev": true }, "node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", "dev": true, "optional": true, "bin": { @@ -7040,11 +7268,20 @@ } }, "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", "dev": true }, + "node_modules/undici": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz", + "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==", + "dev": true, + "engines": { + "node": ">=18.17" + } + }, "node_modules/union": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", @@ -7061,7 +7298,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, "engines": { "node": ">= 10.0.0" } @@ -7075,6 +7311,31 @@ "node": ">=8.11" } }, + "node_modules/unzipper": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.12.3.tgz", + "integrity": "sha512-PZ8hTS+AqcGxsaQntl3IRBw65QrBI6lxzqDEL7IAo/XCEqRTKGfOX56Vea5TH9SZczRVxuzk1re04z/YjuYCJA==", + "dependencies": { + "bluebird": "~3.7.2", + "duplexer2": "~0.1.4", + "fs-extra": "^11.2.0", + "graceful-fs": "^4.2.2", + "node-int64": "^0.4.0" + } + }, + "node_modules/unzipper/node_modules/fs-extra": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=14.14" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -7093,8 +7354,7 @@ "node_modules/url-join": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" }, "node_modules/utf8": { "version": "3.0.0", @@ -7115,9 +7375,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -7150,10 +7410,23 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, "node_modules/walk-back": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-5.1.0.tgz", - "integrity": "sha512-Uhxps5yZcVNbLEAnb+xaEEMdgTXl9qAQDzKYejG2AZ7qPwRQ81lozY9ECDbjLPNWm7YsO1IK5rsP1KoQzXAcGA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-5.1.1.tgz", + "integrity": "sha512-e/FRLDVdZQWFrAzU6Hdvpm7D7m2ina833gIKLptQykRK49mmCYHLHq7UqjPDbxbKLZkTkW1rFqbengdE3sLfdw==", "dev": true, "engines": { "node": ">=12.17" @@ -7332,27 +7605,24 @@ } }, "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, "dependencies": { "iconv-lite": "0.6.3" }, "engines": { - "node": ">=12" + "node": ">=18" } }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=18" } }, "node_modules/whatwg-url": { @@ -7376,6 +7646,14 @@ "which": "bin/which" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/wif": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", @@ -7444,83 +7722,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -7551,9 +7752,9 @@ } }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "engines": { "node": ">=8.3.0" }, @@ -7641,50 +7842,6 @@ "node": ">=10" } }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -7698,90 +7855,17 @@ } }, "node_modules/zeromq": { - "version": "6.0.0-beta.19", - "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-6.0.0-beta.19.tgz", - "integrity": "sha512-2eU6H7Z4r9LmTkseGdIfEqp0k3rJr5EpXQw2oC0bUqy3wpoj1M83IU/c3qHPXp0z8IklNMoVmVm130d3g2Xf3g==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-6.1.1.tgz", + "integrity": "sha512-Ehe2myzrlymPuY4LXdUzNtA595AQQa67d3C06Zy8q2nEjYc9yddZ2rC6p++XhP58RyhDOpHm37ScLCp9BhAyow==", "hasInstallScript": true, "dependencies": { - "@aminya/node-gyp-build": "4.5.0-aminya.5", - "cross-env": "^7.0.3", - "node-addon-api": "^7.0.0", - "shelljs": "^0.8.5", - "shx": "^0.3.4" - }, - "engines": { - "node": ">= 10.2" - } - }, - "node_modules/zeromq/node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", - "dependencies": { - "cross-spawn": "^7.0.1" - }, - "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" - }, - "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" - } - }, - "node_modules/zeromq/node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/zeromq/node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "engines": { - "node": ">=8" - } - }, - "node_modules/zeromq/node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/zeromq/node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "engines": { - "node": ">=8" - } - }, - "node_modules/zeromq/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "@aminya/cmake-ts": "^0.3.0-aminya.7", + "node-addon-api": "^8.2.1" }, "engines": { - "node": ">= 8" + "node": ">= 10", + "pnpm": ">= 9" } } } diff --git a/package.json b/package.json index 547750c6c..c1b09d9b5 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "test": "tests" }, "engines": { - "node": "18.19.0" + "node": "18.19.1" }, "scripts": { "audit": "npm audit --json --level critical > reports/AUDIT.json", @@ -39,9 +39,9 @@ "make:binary": "pkg -c package.json -o assets/binaries/fabric scripts/cli.js", "make:book": "mkdir -p _book && honkit build", "make:coverage": "npm run coverage && c8 report --reporter html", - "make:dev": "npm run make:examples && npm run make:docs && npm run make:book && cp -rf docs _book/ && cp -rf examples _book/ && glob-run js-beautify --indent-size 2 -r _book/**.html", - "make:docs": "npm run make:api && node_modules/.bin/jsdoc -c jsdoc.json services/**.js types/**.js settings/deprecations.js DEVELOPERS.md -d docs/ && glob-run js-beautify --indent-size 2 -r docs/**.html", - "make:examples": "./node_modules/.bin/docco --output assets examples/*.js && ./node_modules/.bin/glob-run ./node_modules/.bin/js-beautify --indent-size 2 -r assets/examples/*.html", + "make:dev": "npm run make:examples && npm run make:docs && npm run make:book && cp -rf docs _book/ && cp -rf examples _book/ && js-beautify --indent-size 2 -r _book/**.html", + "make:docs": "npm run make:api && node_modules/.bin/jsdoc -c jsdoc.json services/**.js types/**.js settings/deprecations.js DEVELOPERS.md -d docs/ && js-beautify --indent-size 2 -r docs/**.html", + "make:examples": "./node_modules/.bin/docco --output assets examples/*.js && ./node_modules/.bin/js-beautify --indent-size 2 -r assets/examples/*.html", "make:lib": "### ERROR: Not yet implemented. Debug: `scripts/fabric.js` to `assets/fabric.min.js`", "make:nix": "node2nix --lock package-lock.json --nodejs-16 --node-env .nix/node-env.nix --output .nix/node-packages.nix", "make:service": "### ERROR: Not yet implemented. Debug: ` examples/service.js` to `assets/service.js`", @@ -61,7 +61,7 @@ "test:bitcoin": "mocha tests/bitcoin.core.js", "test:wasm": "emcc contracts/test.c -o assets/wasm.html", "test": "NODE_ENV=test mocha --recursive tests", - "tidy": "glob-run js-beautify --indent-size 2 -r _book/**.html", + "tidy": "js-beautify --indent-size 2 -r _book/**.html", "watch:book": "honkit serve --port 8000 # NOTE: /docs and /examples may not be available." }, "repository": { @@ -83,63 +83,60 @@ }, "homepage": "https://github.com/FabricLabs/fabric#readme", "dependencies": { - "arbitrary": "1.4.10", - "base58check": "2.0.0", - "bech32-buffer": "0.2.0", - "bip-schnorr": "0.6.6", - "bip32": "4.0.0", - "bip39": "3.0.4", - "bip65": "1.0.3", - "bip68": "1.0.4", - "bitcoinjs-lib": "6.0.0", - "blessed": "0.1.81", - "bn.js": "5.2.1", - "buffer": "6.0.3", - "commander": "6.1.0", - "content-type": "1.0.4", - "cross-fetch": "3.1.5", - "dotparser": "0.3.0", - "ecpair": "2.0.1", - "elliptic": "6.5.4", - "events": "3.3.0", - "fast-json-patch": "3.1.1", - "is-my-json-valid": "2.20.6", - "javascript-state-machine": "3.1.0", - "jayson": "4.0.0", - "json-pointer": "0.6.2", - "jsonpointer": "5.0.1", - "level": "7.0.1", - "lodash.merge": "4.6.2", - "macaroon": "3.0.4", - "merkletreejs": "0.3.11", - "minsc": "0.2.0", - "mkdirp": "1.0.4", - "noise-protocol-stream": "1.1.3", - "path-match": "1.2.4", - "pluralize": "8.0.0", - "redis": "3.1.2", - "rimraf": "2.6.2", - "simple-aes": "0.1.1", - "struct": "0.0.12", - "tiny-secp256k1": "2.2.1", - "zeromq": "v6.0.0-beta.19" + "arbitrary": "=1.4.10", + "base58check": "=2.0.0", + "bech32-buffer": "=0.2.1", + "bip-schnorr": "=0.6.6", + "bip32": "=4.0.0", + "bip39": "=3.1.0", + "bip65": "=1.0.3", + "bip68": "=1.0.4", + "bitcoinjs-lib": "=6.0.0", + "blessed": "=0.1.81", + "bn.js": "=5.2.1", + "buffer": "=6.0.3", + "commander": "=12.1.0", + "content-type": "=1.0.4", + "cross-fetch": "=4.0.0", + "dotparser": "=1.1.1", + "ecpair": "=2.0.1", + "elliptic": "=6.6.0", + "events": "=3.3.0", + "fast-json-patch": "=3.1.1", + "javascript-state-machine": "=3.1.0", + "jayson": "=4.1.2", + "json-pointer": "=0.6.2", + "jsonpointer": "=5.0.1", + "level": "=9.0.0", + "lodash.merge": "=4.6.2", + "macaroon": "=3.0.4", + "merkletreejs": "=0.4.0", + "minsc": "=0.2.0", + "mkdirp": "=1.0.4", + "noise-protocol-stream": "=1.1.3", + "path-match": "=1.2.4", + "pluralize": "=8.0.0", + "redis": "=4.7.0", + "simple-aes": "=0.1.1", + "struct": "=0.0.12", + "tiny-secp256k1": "=2.2.3", + "zeromq": "=6.1.1" }, "devDependencies": { - "c8": "7.11.3", - "chai": "4.0.2", - "cross-env": "5.1.3", - "debug-trace": "2.2.1", - "docco": "0.9.1", - "eccrypto": "1.0.3", - "eslint": "5.16.0", - "glob-run": "0.1.7", - "honkit": "4.0.7", - "http-server": "14.1.1", - "js-beautify": "1.14.3", - "jsdoc": "4.0.2", - "jsdoc-to-markdown": "7.1.1", - "json-to-dot": "1.1.0", - "mocha": "10.2.0" + "c8": "=7.11.3", + "chai": "=4.0.2", + "cross-env": "=5.2.1", + "debug-trace": "=2.2.1", + "docco": "=0.9.1", + "eslint": "=9.16.0", + "honkit": "=6.0.2", + "http-server": "=14.1.1", + "is-my-json-valid": "=2.20.6", + "js-beautify": "=1.14.3", + "jsdoc": "=4.0.2", + "jsdoc-to-markdown": "=7.1.1", + "json-to-dot": "=1.1.0", + "mocha": "=10.2.0" }, "c8": { "exclude": [ diff --git a/reports/TODO.txt b/reports/TODO.txt index 61a02f5af..34506738e 100644 --- a/reports/TODO.txt +++ b/reports/TODO.txt @@ -231,7 +231,6 @@ ./types/stack.js: // TODO: return Transaction ./API.md:TODO: move to @fabric/http/types/spa ./API.md:TODO: move to @fabric/http/types/spa -./API.md:TODO: move to @fabric/http/types/spa ./SUMMARY.md:* [✅ TODO List][todo] ./SUMMARY.md:[todo]: TODO.md ./fabric-whitepaper.md:### TODO: include content hashes of links as they appear at document compilation time. @@ -299,7 +298,7 @@ ./scripts/chat.js: // TODO: replicate this program in C / ASM ./scripts/transfer.js: // TODO: add support for segwit, taproot ./functions/_handleFabricMessage.js: const message = Message.fromVector([...data]); // TODO: redefine... -./GOALS.md:- [ ] Find all TODO items (run script, check diff) +./GOALS.md:- [x] Find all TODO items (run script, check diff) ./services/bitcoin.js:// TODO: replace with `secp256k1` ./services/bitcoin.js: // httpPort: 48449, // TODO: disable HTTP entirely! ./services/bitcoin.js: // TODO: import ZMQ settings diff --git a/reports/install.log b/reports/install.log index eb4ef6c0c..2284e666e 100644 --- a/reports/install.log +++ b/reports/install.log @@ -1,8 +1,13 @@ $ npm i -added 719 packages, and audited 720 packages in 47s +added 734 packages, and audited 735 packages in 20s -86 packages are looking for funding +98 packages are looking for funding run `npm fund` for details -found 0 vulnerabilities +2 low severity vulnerabilities + +Some issues need review, and may require choosing +a different dependency. + +Run `npm audit` for details. diff --git a/scripts/identity.js b/scripts/identity.js index a861ba6e0..b4d0d68df 100644 --- a/scripts/identity.js +++ b/scripts/identity.js @@ -4,6 +4,7 @@ const { FIXTURE_SEED } = require('../constants'); +// const DERIVATION = `m/44'/7777'/0'/0/0`; const DERIVATION = `m/44'/0'/0'/0/0`; const PREFIX = 'id'; // const X_PUBKEY = '0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798'; diff --git a/services/exchange.js b/services/exchange.js index 5da48961a..fa2df48e9 100644 --- a/services/exchange.js +++ b/services/exchange.js @@ -15,19 +15,7 @@ const Collection = require('../types/collection'); const Message = require('../types/message'); const Service = require('../types/service'); -/** - * Implements a basic Exchange. - */ class Exchange extends Service { - /** - * Create an instance of the Exchange. You may run two instances at - * once to simulate two-party contracts, or use the Fabric Market to - * find and trade with real peers. - * @param {Object} settings Map of settings to values. - * @param {Object} settings.fees Map of fee settings (all values in BTC). - * @param {Object} settings.fees.minimum Minimum fee (satoshis). - * @returns Exchnge - */ constructor (settings = {}) { super(settings); diff --git a/services/lightning.js b/services/lightning.js index ad1055d66..7fd97f964 100644 --- a/services/lightning.js +++ b/services/lightning.js @@ -43,7 +43,12 @@ class Lightning extends Service { this._state = { content: { actors: {}, - balances: {}, + balances: { + spendable: 0, + total: 0, + confirmed: 0, + unconfirmed: 0 + }, channels: {}, blockheight: null, node: { diff --git a/services/redis.js b/services/redis.js index 153b04e7c..e62d14d9d 100644 --- a/services/redis.js +++ b/services/redis.js @@ -5,14 +5,14 @@ const Service = require('../types/service'); const Message = require('../types/message'); /** - * Connect and subscribe to ZeroMQ servers. + * Connect and subscribe to Redis servers. */ class Redis extends Service { /** - * Creates an instance of a ZeroMQ subscriber. + * Creates an instance of a Redis subscriber. * @param {Object} [settings] Settings for the Redis connection. * @param {String} [settings.host] Host for the Redis server. - * @param {Number} [settings.port] Remote ZeroMQ service port. + * @param {Number} [settings.port] Remote Redis service port. * @returns {Redis} Instance of the Redis service, ready to run `start()` */ constructor (settings = {}) { diff --git a/types/aggregator.js b/types/aggregator.js index 7eb7efec7..3a0c22d5e 100644 --- a/types/aggregator.js +++ b/types/aggregator.js @@ -8,16 +8,7 @@ const Service = require('./service'); const Actor = require('./actor'); const Tree = require('./tree'); -/** - * Aggregates a set of balances (inputs). - */ class Aggregator extends Service { - /** - * Create a new Aggregator. - * @param {Object} [settings] Map of configuration values. - * @param {Array} [settings.inputs] Array of {@link AnchorBalance} instances. - * @returns {Aggregator} Instance of the {@link Aggregator}. - */ constructor (settings = {}) { super(settings); diff --git a/types/app.js b/types/app.js index 800f2ef7f..bcd1176d8 100644 --- a/types/app.js +++ b/types/app.js @@ -15,20 +15,7 @@ const Service = require('./service'); const Storage = require('./store'); // const Swarm = require('./swarm'); -/** - * Web-friendly application framework for building single-page applications with - * Fabric-based networking and storage. - * @extends Service - * @property {Collection} components Interface elements. - * @property {Store} stash Routable {@link Datastore}. - */ -// class App extends Scribe { class App extends Service { - /** - * Generic bundle for building Fabric applications. - * @param {Object} definition Application definition. See `config` for examples. - * @return {App} Returns an instance of `App`. - */ constructor (definition = {}) { super(definition); diff --git a/types/circuit.js b/types/circuit.js index e7eb64953..946fd25ee 100644 --- a/types/circuit.js +++ b/types/circuit.js @@ -14,7 +14,7 @@ const Actor = require('./actor'); * The {@link Circuit} is the mechanism through which {@link Fabric} * operates, a computable directed graph describing a network of * {@link Peer} components and their interactions (side effects). - * See also {@link Swarm} for deeper *inspection of {@link Machine} + * See also {@link Swarm} for deeper inspection of {@link Machine} * mechanics. */ class Circuit extends Actor { diff --git a/types/cli.js b/types/cli.js index 99aff10f7..82074f2b7 100644 --- a/types/cli.js +++ b/types/cli.js @@ -3,11 +3,10 @@ // Constants const { MAX_CHAT_MESSAGE_LENGTH, + INPUT_HINT, BITCOIN_GENESIS } = require('../constants'); -const INPUT_HINT = 'Press the "i" key to begin typing.'; - // Internal Dependencies const fs = require('fs'); const EventEmitter = require('events').EventEmitter; @@ -80,7 +79,7 @@ class CLI extends App { storage: { path: `${process.env.HOME}/.fabric/console` } - }, this.settings, settings); + }, settings); // Properties this.screen = null; @@ -312,7 +311,7 @@ class CLI extends App { this.bitcoin.on('transaction', this._handleBitcoinTransaction.bind(this)); // #### Lightning - if (this.settings.lightning.enable) { + if (this.settings.lightning && this.settings.lightning.enable) { this.lightning.on('debug', this._handleLightningDebug.bind(this)); this.lightning.on('ready', this._handleLightningReady.bind(this)); this.lightning.on('error', this._handleLightningError.bind(this)); diff --git a/types/compiler.js b/types/compiler.js index d20abe0a6..949682a14 100644 --- a/types/compiler.js +++ b/types/compiler.js @@ -45,19 +45,7 @@ const Machine = require('./machine'); // ``` // This will auto-configure validation base from chain of greatest work. -/** - * Compilers build interfaces for users of Fabric applications. - * @type {Actor} - * @property {AST} ast Compiler's current AST. - * @property {Entity} entity Compiler's current {@link Entity}. - */ class Compiler { - /** - * Create a new Compiler. - * @param {Object} settings={} Configuration. - * @param {Buffer} settings.body Body of the input program to compile. - * @return {Compiler} Instance of the compiler. - */ constructor (settings = {}) { this.settings = Object.assign({ ast: null, diff --git a/types/consensus.js b/types/consensus.js index 7bd0edd84..706cae448 100644 --- a/types/consensus.js +++ b/types/consensus.js @@ -7,16 +7,7 @@ // For node... const bcoin = require('bcoin'); -/** - * Provides various network-specific rules. - */ class Consensus { - /** - * Create an instance of a {@link Consensus} verifier. - * @param {Object} [settings] Configuration for the network. - * @param {String} [settings.network] Name of the network. - * @param {String} [settings.provider] Name of the source provider. - */ constructor (settings = {}) { this.settings = Object.assign({ network: 'mainnet', diff --git a/types/entity.js b/types/entity.js index 9901612a6..ebc4b2ab9 100644 --- a/types/entity.js +++ b/types/entity.js @@ -3,16 +3,7 @@ const crypto = require('crypto'); const { EventEmitter } = require('events'); -/** - * Live instance of an ARC in Fabric. - * @type {Object} - */ class Entity extends EventEmitter { - /** - * Generic template for virtual objects. - * @param {Object} [data={}] Pass an object to use. - * @return {Entity} Instance of the {@link Entity}. - */ constructor (data = {}) { super(data); diff --git a/types/filesystem.js b/types/filesystem.js index 958734f47..0d9a96d91 100644 --- a/types/filesystem.js +++ b/types/filesystem.js @@ -206,6 +206,15 @@ class Filesystem extends Actor { this._state.content.status = 'STARTING'; this.touchDir(this.path); // ensure exists this.sync(); + + fs.watch(this.path, { + persistent: false, + recursive: true + }, this._handleDiskChange.bind(this)); + + this._state.content.status = 'STARTED'; + this.commit(); + return this; } diff --git a/types/key.js b/types/key.js index 0fb6d6684..7d01a825f 100644 --- a/types/key.js +++ b/types/key.js @@ -167,6 +167,8 @@ class Key { this.settings.private ) + ''); + if (!this._starseed) this._starseed = '0000000000000000000000000000000000000000000000000000000000000000'; + this.q = parseInt(this._starseed.substring(0, 4), 16); this.generator = new Generator(this.q); diff --git a/types/keystore.js b/types/keystore.js index 9c387a47a..a4b9bfb91 100644 --- a/types/keystore.js +++ b/types/keystore.js @@ -1,7 +1,7 @@ 'use strict'; // Dependencies -const level = require('level'); +const { Level } = require('level'); const merge = require('lodash.merge'); const monitor = require('fast-json-patch'); const pointer = require('json-pointer'); @@ -13,16 +13,7 @@ const Message = require('./message'); const Tree = require('./tree'); const Key = require('./key'); -/** - * Provides an encrypted datastore for generic object storage. - */ class Keystore extends Actor { - /** - * Create an instance of the Store. - * @param {FabricStoreConfiguration} [configuration] Settings to use. - * @param {String} [configuration.name="DefaultStore"] Name of the Store. - * @returns {Keystore} Instance of the store. - */ constructor (settings = {}) { super(settings); if (!settings.seed) settings.seed = (process) ? process.env.FABRIC_SEED || null : null; @@ -131,7 +122,7 @@ class Keystore extends Actor { } try { - keystore.db = level(keystore.settings.path, { + keystore.db = new Level(keystore.settings.path, { keyEncoding: keystore.codec, valueEncoding: keystore.codec }, _handleDiskOpen.bind(keystore)); diff --git a/types/mempool.js b/types/mempool.js index 7d592e2c5..60a6d57b4 100644 --- a/types/mempool.js +++ b/types/mempool.js @@ -5,15 +5,7 @@ const Service = require('./service'); const Collection = require('./collection'); const Transaction = require('./transaction'); -/** - * Stores a list of {@link Transaction} elements. - * @emits {Message} confirmed Emitted when the Mempool has dropped a transaction. - */ class Mempool extends Service { - /** - * Creates an instance of a {@link Mempool} {@link Service}. - * @param {Object} settings Map of settings to utilize. - */ constructor (settings = {}) { super(settings); diff --git a/types/node.js b/types/node.js index 3a96f92a9..edaf2b568 100644 --- a/types/node.js +++ b/types/node.js @@ -13,15 +13,7 @@ const Service = require('../types/service'); const Environment = require('../types/environment'); const environment = new Environment(); -/** - * Full definition of a Fabric node. - */ class Node extends Service { - /** - * Manage a Fabric service. - * @param {Object} settings Configuration for the node. - * @returns {Node} Instance of the managed service. - */ constructor (settings = {}) { super(settings); diff --git a/types/oracle.js b/types/oracle.js index 11afdfd21..3ae03182f 100644 --- a/types/oracle.js +++ b/types/oracle.js @@ -4,16 +4,7 @@ const Machine = require('./machine'); const Resource = require('./resource'); const Store = require('./store'); -/** - * An Oracle manages one or more collections, using a mempool for - * transitive state. - * @extends Store - */ class Oracle extends Store { - /** - * Trusted point-of-reference for external services. - * @param {Object} initial - Initialization vector. - */ constructor (init) { super(init); diff --git a/types/path.js b/types/path.js index 724637d51..e276cbdda 100644 --- a/types/path.js +++ b/types/path.js @@ -1,14 +1,6 @@ 'use strict'; -/** - * A {@link Path} is a {@link Fabric}-native link to a {@link Document} - * within the network. - */ class Path extends String { - /** - * Create a new {@link Path}. - * @param {String|Object} input Named path. - */ constructor (input = {}) { super(input); @@ -31,4 +23,4 @@ class Path extends String { } } -module.exports = Path; \ No newline at end of file +module.exports = Path; diff --git a/types/peer.js b/types/peer.js index a53b76f1e..59c0c696a 100644 --- a/types/peer.js +++ b/types/peer.js @@ -725,6 +725,20 @@ class Peer extends Service { }, when); } + _selectBestPeerCandidate () { + const candidates = []; + + for (const id of Object.entries(this.peers)) { + candidates.push(id); + } + + candidates.sort((a, b) => { + return (a.score > b.score) ? 1 : 0; + }); + + return candidates[0] || null; + } + _verifyNOISE (localPrivateKey, localPublicKey, remotePublicKey, done) { // Is the message valid? if (1 === 1) { diff --git a/types/queue.js b/types/queue.js index 1800f8d48..88ff1f0c8 100644 --- a/types/queue.js +++ b/types/queue.js @@ -8,6 +8,7 @@ class Queue extends Actor { super(settings); this.settings = merge({ + redis: null, workers: 1 }, settings); @@ -25,6 +26,10 @@ class Queue extends Actor { await this._registerMethod('verify', async function (...params) { }); + + if (this.settings.redis) { + this._state.redis = this.settings.redis; + } } async _registerMethod (name, contract) { diff --git a/types/remote.js b/types/remote.js index 758cab5f7..fcde813da 100644 --- a/types/remote.js +++ b/types/remote.js @@ -454,6 +454,7 @@ class Remote extends Actor { } async _SEARCH (key, params) { + if (this.settings.debug) console.debug('[FABRIC:CORE]', '_SEARCH:', key, params); return this.request('search', key, params); } } diff --git a/types/router.js b/types/router.js index 31eb2b43e..efd0ecadb 100644 --- a/types/router.js +++ b/types/router.js @@ -6,15 +6,7 @@ const Scribe = require('./scribe'); // Current code is specific to @fabric/doorman — should be a general- // purpose Router, not for strings and triggers in chat messages. -/** - * Process incoming messages. - * @extends Scribe - */ class Router extends Scribe { - /** - * Maintains a list of triggers ("commands") and their behaviors. - * @param {Object} map Map of command names => behaviors. - */ constructor (config) { super(config); diff --git a/types/scribe.js b/types/scribe.js index b66f53f3e..d91580be3 100644 --- a/types/scribe.js +++ b/types/scribe.js @@ -5,17 +5,7 @@ const crypto = require('crypto'); // Fabric Components const State = require('./state'); -/** - * Simple tag-based recordkeeper. - * @extends State - * @property {Object} config Current configuration. - */ class Scribe extends State { - /** - * The "Scribe" is a simple tag-based recordkeeper. - * @param {Object} config General configuration object. - * @param {Boolean} config.verbose Should the Scribe be noisy? - */ constructor (config = {}) { super(config); diff --git a/types/service.js b/types/service.js index b314f288e..92e2d0008 100644 --- a/types/service.js +++ b/types/service.js @@ -400,7 +400,7 @@ class Service extends Actor { self.emit('debug', `[FABRIC:SERVICE] Source "${name}" emitted channel: ${JSON.stringify(channel, null, ' ')}`); }), _handleCommit: source.on('commit', async function (commit) { - self.emit('log', `[FABRIC:SERVICE] Source "${name}" committed: ${JSON.stringify(commit, null, ' ')}`); + self.emit('debug', `[FABRIC:SERVICE] Source "${name}" committed: ${JSON.stringify(commit, null, ' ')}`); }), _handleError: source.on('error', async function _handleTrustedError (error) { self.emit('debug', `[FABRIC:SERVICE] Source "${name}" emitted error: ${error}`); @@ -496,6 +496,16 @@ class Service extends Actor { return true; } + /** + * Bind a method to an event, with current state as the immutable context. + * @param {String} event Name of the event upon which to execute `method` as a function. + * @param {Function} method Function to execute when named {@link Event} `event` is encountered. + * @returns {EventEmitter} Instance of EventEmitter. + */ + when (event, method) { + return this.on(event, method.call(this.state)); + } + _defineResource (name, definition) { const resource = Object.assign({ name }, definition); this.resources[name] = new Resource(resource); diff --git a/types/store.js b/types/store.js index d931a8c89..a5a33066e 100644 --- a/types/store.js +++ b/types/store.js @@ -1,7 +1,7 @@ 'use strict'; // Dependencies -const level = require('level'); +const { Level } = require('level'); const crypto = require('crypto'); const pointer = require('json-pointer'); @@ -390,7 +390,7 @@ class Store extends Actor { // if (this.db) return this; try { - this.db = level(this.settings.path); + this.db = new Level(this.settings.path); this.trust(this.db); this.status = 'opened'; await this.commit(); diff --git a/types/swap.js b/types/swap.js index 519f1110d..126272d20 100644 --- a/types/swap.js +++ b/types/swap.js @@ -8,17 +8,7 @@ const bcoin = require('bcoin'); // Native Dependencies const crypto = require('crypto'); -/** - * The {@link Swap} contract executes a set of transactions on two distinct - * {@link Chain} components, utilizing a secret-reveal mechanism to atomically - * execute either the full set or none. - * @type {Object} - */ class Swap { - /** - * Atomically execute a set of transactions across two {@link Chain} components. - * @param {Object} [settings={}] Configuration for the swap. - */ constructor (settings = {}) { this.settings = Object.assign({ chain: 'bitcoin:regtest' diff --git a/types/transition.js b/types/transition.js index 0c833c5bd..21eb26f75 100644 --- a/types/transition.js +++ b/types/transition.js @@ -9,15 +9,7 @@ const EncryptedPromise = require('./promise'); const Entity = require('./entity'); const Witness = require('./witness'); -/** - * The {@link Transition} type reflects a change from one finite - * {@link State} to another. - */ class Transition extends Entity { - /** - * - * @param {Object} settings Configuration for the transition object. - */ constructor (settings = {}) { super(settings);
      NameTypeDescription
      keypair - Object - Keypair. -
      Properties
      - - - - + +
      Source:
      +
      + +
      - - + - - - - - - - - - - - +

      (static) createSeed(passphrase) → {FabricSeed}

      - - - +
      NameTypeAttributesDescription
      public - Buffer - - Public key.
      private - Buffer +
      + Create a new seed phrase. +
      -
      - <optional>
      +
      Parameters:
      -
      + + + - - + + + + + + + + + + + + + + + + + + + -
      NamePrivate key.
      TypeDescription
      passphrase + + + String -
      BIP 39 passphrase for key derivation.
      inputseed - String + FabricSeed @@ -2336,7 +2406,7 @@
      Parameters:
      -
      Hex-encoded string to create key from.Fabric seed.