Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/willow_utils/mod.ts

TypeScript typings and utilities for the Willow protocol.
Go to Latest
import * as willowUtils from "https://deno.land/x/willow_utils@0.8.0/mod.ts";

Classes

An array of growing bytes which can be awaited upon and pruned.

Variables

Represents an open value for a range ending.

Functions

Return whether an area is fully included by another area.

Convert an Area to a Range3d.

Return the prefix shared by two Paths.

Returns the number of octets needed to store a number, along the lines of 8-bit, 16-bit, 32-bit, or 64-bit unsigned integers.

Decode an Area relative to a known outer Area.

Decode a variable width integer. Uses the bytelength of the passed encoding to determine the compact width.

Decode bytes to an Entry.

Decodes a path.

Decodes a Path relative to another Path.

Decodes an encoded path (which is streaming in).

Decodes an UintMax unsigned integer,

Encode an Area relative to known outer Area.

Encodes an integer using the smallest number of bytes possible.

Encodes the length of a Path.

Encode an Entry.

Encodes a path.

Encodes a Path relative to another Path.

Encodes a number as a UintMax, with Max being the maximum number of octets needed to represent the unsigned integer

Returns the Position3d of an Entry.

Return the intersection of two areas, for which there may be none.

Returns the intersection of two ranges, of which there may be none.

Returns whether a Position3d is included by a given Range.

Return whether a 3d position is included by an Area.

Returns whether a Value is included by a given Range.

Returns whether a path is prefixed by another path.

Return whether a subspace ID is included by an Area.

Returns whether a Path does not exceed the limits given by a PathScheme.

Returns the maximum number of octets needed to store an unsigned integer.

A total order over bytestrings.

A total order over Path.

Order a given pair of ranges by their type. Useful for functions using boolean logic based on the different combinations of range types.

A total order over BigInt.

Return all prefixes of a given path (which included the path itself), in order of path length.

Returns whether a range is fully included by another range.

Return the succeeding bytestring of the given bytestring without increasing that bytestring's length.

Returns the successor to a path given a Path and PathScheme.

Return a successor to a prefix, that is, the next element that is not a prefix of the given path.

Type Aliases

A grouping of Entries.

A grouping of Entries that are among the newest in some store.

The metadata for storing a payload.

A scheme for encoding public keys and the signatures they produce.

A scheme for signing with a keypair, and encoding the associated public keys and signatures.

A Path is a sequence of bytestrings which Entrys are written to.

A set of limits for Paths.

A position in a space with dimensions of time, path, and subspace.

A closed or open range of values.

A three-dimensional with dimension of time, path, and subspace.

A scheme for signing and verifying data using key pairs.

A function which returns the succeeding value for a given value of a set.

Defines a total order over a given set.