# @earthstar/willow-utils@1.0.2Built and signed on GitHub ActionsBuilt and signed on GitHub Actions

Useful common types and utilities for implementing Willow protocols.

Represents any subspace ID.

A grouping of Entries.

Return whether an area is fully included by another area.

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

Convert an `Area`

to a `Range3d`

.

Encode a `BigInt`

.

Return the prefix shared by two `Path`

s.

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`

.

Decode an encoded `Range3d`

relative to another `Range3d`

.

Decode an `Area`

encoded relative to an outer `Area`

from a `GrowingBytes`

.

Decode an Entry relative to a namespace area from `GrowingBytes`

.

Decode an `Entry`

encoded relative to another `Entry`

from `GrowingBytes`

.

Decode an `Entry`

encoded relative to a `Range3d`

from `GrowingBytes`

.

Decodes an encoded path (which is streaming in).

Decodes a `Path`

relative to another `Path`

from `GrowingBytes`

.

Decode an `Range3d`

relative to another `Range3d`

from `GrowingBytes`

.

Decodes an UintMax unsigned integer,

The open 3d range starting at a given default subspace ID.

Encode an `Area`

relative to known outer `Area`

.

The length of an encoded area in area.

Encodes an integer using the smallest number of bytes possible.

Encodes the length of a `Path`

.

Determine the bytelength of a `Path`

encoded relative to another `Path`

.

Encode an `Entry`

.

Encode an `Entry`

relative to an `Area`

.

Encode an `Entry`

relative to another `Entry`

.

Encode an `Entry`

relative to an outer `Range3d`

.

Encodes a path.

Encodes a `Path`

relative to another `Path`

.

Encode a `Range3d`

relative to another `Range3d`

.

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

A scheme for encoding and decoding values of `ValueType`

.

The metadata for storing a payload.

Returns the `Position3d`

of an `Entry`

.

The full area is the Area including all Entries.

A bytestring which, upon request, pulls bytes from an asynchronous source of bytes.

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

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

Intersect two `Range3d`

.

Compare a possible range value of `ValueType`

or `OPEN_END`

to another for equality.

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 whether the range's end is greater than its start.

Returns whether all a 3d range's constituent ranges are valid, i.e. correctly ordered.

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.

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

Represents an open value for a range ending.

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`

.

A Path is a sequence of bytestrings which `Entry`

s are written to.

A set of limits for `Path`

s.

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

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

A closed or open range of values.

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

Returns whether a range is fully included by another range.

A scheme for signing and verifying data using key pairs.

A decoder for decoding values of `ValueType`

from a `GrowingBytes`

The subspace area is the Area include all entries with a given subspace ID.

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

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

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.

Defines a total order over a given set.