Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/willow/mod.browser.ts

Exploring Willow in the most efficient and sound programming language
Go to Latest
import * as willow from "https://deno.land/x/willow@0.2.1/mod.browser.ts";

Classes

Store and retrieve entries in a key-value store.

Stores and retrieves payloads from IndexedDB.

Stores and retrieves payloads in memory.

A local set of a particular namespace's authorised entries to be written to, read from, and synced with other Stores. Applies the concepts of the Willow Data Model to the set of entries stored inside.

Validation failed on an entry, keypair, etc.

Validation failed on an entry, keypair, etc.

Coordinates an open-ended synchronisation session between two peers using the Willow General Purpose Sync Protocol.

Generic top-level error class that other Willow errors inherit from.

Variables

The peer which initiated the synchronisation session.

The peer which did not initiate the synchronisation session.

A monoid which lifts the member as 1, and combines by adding together.

Functions

Combine two lifting monoids into a new one.

The ordering on keys. Lexicographically compares the KeyParts according to compareTwoKeyParts.

The ordering on KeyParts. Uint8Arrays are less than strings are less than numbers are less than booleans. Amongst themselves, Uint8Arrays are compared lexicographically, strings use the js < and > operators, numbers use the js < and > operators, and booleans use the js < and > operators.

Decrypt a Path.

Encrypt a Path.

Check if any value is a subclass of WillowError (return true) or not (return false)

Returns whether the first argment is a prefix of the second argument.

Check if any value is a subclass of WillowError (return false) or not (return true)

Interfaces

Provides methods for storing and retrieving entries for a Store.

Provides methods for storing and retrieving Payloads.

Keeps count of how many entries refer to a given payload, and is ablo to modify that count.

A data structure which stores Path-value pairs, and can efficiently track which paths are prefixes of others.

Low-level driver for writing and reading Entries in a three dimensional space.

The parameter schemes required to instantiate a Store.

A transport for receiving and sending data to with another peer

Writes and reads flags indicating write operations to the store, in order to recover from errors mid-write.

Type Aliases

Configures the AuthorisationToken and is_authorised_write parameters of the Willow data model, used to restrict write access to a Willow data store.

Configures the types of StaticToken and DynamicToken for the Willow General Purpose Sync Protocol.

Compare two ValueType for equality.

Configures the Fingerprint and PreFingerprint parameters used by 3d range-based set reconciliation.

Return a Store for a given NamespaceId.

Emitted after entry ingestion.

Emitted after an entry fails to be ingested by a store, either due to error or entry invalidity.

Emitted after an entry is not ingested by a store due to it being obsoleted by a more recent entry.

Emitted after a successuful entry ingestion.

Emitted after payload entry.

Emitted after a payload fails to be ingested, either because there is no entry corresponding to it, or because the given payload did not match the entry's PayloadDigest.

Emitted after a payload is not ingested because it is already held by the Store.

Emitted after the succesful ingestion of a payload.

Describes an entry and the amount of locally available payload bytes. https://willowprotocol.org/specs/3d-range-based-set-reconciliation/index.html#LengthyEntry

This interface combines two bits of functionality:

Complete the commitment scheme to determine the challenge for read authentication.

Allow the other peer to reduce its total buffer capacity by amount.

Ask the other peer to send an ControlAbsolve message such that the receiver remaining guarantees will be target.

Notify the other peer that it can stop dropping messages of this logical channel.

Make a binding promise of available buffer capacity to the other peer.

Ask the other peer to send an ControlAbsolve message such that the receiver remaining guarantees will be target.

Bind an Entry to a PayloadRequestHandle and request transmission of its Payload from an offset.

Set up the state for replying to a DataBindPayloadRequest message.

Transmit an AuthorisedEntry to the other peer, and optionally prepare transmission of its Payload.

Transmit some Payload bytes.

Express a preference whether the other peer should eagerly forward Payloads in the intersection of two AreaOfInterests.

Bind data to an IntersectionHandle for performing private area intersection.

Finalise private set intersection for a single item.

Send a previously requested SubspaceCapability.

Ask the receiver to send a SubspaceCapability.

Prepare transmission of the LengthyEntries a peer has in a 3dRange as part of 3d range-based set reconciliation.

Transmit a LengthyEntry as part of 3d range-based set reconciliation.

Send a Fingerprint as part of 3d range-based set reconciliation.

Indicate that no more bytes will be transmitted for the currently transmitted Payload as part of set reconciliation.

Configures the NamespaceId parameter of the Willow data model, as well as some associated parameters for the Willow General Sync Protocol.

Messagest which belong to no logical channel.

The (possibly partial) data associated with a SignedEntry.

Configures the PayloadDigest parameter of the Willow data model, as well as some associated parameters for the Willow General Sync Protocol.

THe order in which to return entries.

A type exclusive to this implementation, used to make our lives easier.

Represents an authorisation to read an area of data in a Namespace

Configures the SubspaceId parameter of the Willow data model, as well as some associated parameters for the Willow General Sync Protocol.

A message sent or received during a synchronisation session.

we refer to the peer that initiated the synchronisation session as Alfie, and the other peer as Betty.

The parameter schemes required to instantiate a WgpsMessenger.