Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions dist/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ Protocol written in [TypeScript](https://developer.mozilla.org/en-US/docs/Glossa
and compiled to [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript),
to support the development of Whiteflag-enabled applications in JavaScript.

The `@whiteflagprotocol/core` package provides the modules that define
Whiteflag core protocol features as specified in the Whiteflag standard.
As such, this package is not a fully functional implementation of the
protocol, but separates core protocol functions from implementation-specific
design decisions. Therefore, this package is not intended to be used directly
by implementations of Whiteflag; instead, the `@whiteflagprotocol/main` should
be used.
The [`@whiteflagprotocol/core`](https://www.npmjs.com/package/@whiteflagprotocol/core)
package provides the modules that define Whiteflag core protocol features as
specified in the Whiteflag standard. As such, this package is not a fully
functional implementation of the protocol, but separates core protocol
functions from implementation-specific design decisions. Therefore, this
package is not intended to be used directly by implementations of Whiteflag;
instead, the [`@whiteflagprotocol/main`](https://www.npmjs.com/package/@whiteflagprotocol/main)
package should be used.

This description provides a generic overview of the WFJSL core package.
Please see the [WFJSL TypeDoc documentation](https://js.whiteflagprotocol.org/typedoc)
Expand All @@ -35,7 +36,7 @@ code `F`) and set the `Text` field, may be done as follows:

```{javascript}
let wfMessage = new WfCoreMessage('F');
WfCoreMessage.set('Text', 'Example text to be sent with the FreeText message');
wfMessage.set('Text', 'Example text to be sent with the FreeText message');
```

The `encode()` method encodes the message. The `WfCoreMessage` class
Expand Down
2 changes: 1 addition & 1 deletion dist/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @document docs/md/modules.md
* @primaryExport
*/
export { encodeField, decodeField, isValidValue } from './lib/codec.ts';
export { WfCodec, encodeField, decodeField, isValidValue } from './lib/codec.ts';
export { WfProtocolError, WfErrorCode } from './lib/errors.ts';
export { WfMsgType, WfCoreMessage, isValidMessage, validateMessage, encryptMessage, decryptMessage } from './lib/message.ts';
export { WfVersion } from './lib/versions.ts';
2 changes: 1 addition & 1 deletion dist/core/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
export { encodeField, decodeField, isValidValue } from "./lib/codec.js";
export { WfCodec, encodeField, decodeField, isValidValue } from "./lib/codec.js";
export { WfProtocolError, WfErrorCode } from "./lib/errors.js";
export { WfMsgType, WfCoreMessage, isValidMessage, validateMessage, encryptMessage, decryptMessage } from "./lib/message.js";
export { WfVersion } from "./lib/versions.js";
7 changes: 4 additions & 3 deletions dist/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ Protocol written in [TypeScript](https://developer.mozilla.org/en-US/docs/Glossa
and compiled to [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript),
to support the development of Whiteflag-enabled applications in JavaScript.

The `@whiteflagprotocol/crypto` package provides cryptographic functions for
other Whiteflag packages. Therefore, it should normally not be necessary to
add this package as a dependency.
The [`@whiteflagprotocol/crypto`](https://www.npmjs.com/package/@whiteflagprotocol/crypto)
package provides cryptographic functions for other Whiteflag packages.
Therefore, it should normally not be necessary to add this package as a
dependency.

The WFJSL uses the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)
for the basic implementation of Whiteflag cryptographic functions, such as
Expand Down
2 changes: 1 addition & 1 deletion dist/crypto/lib/hash.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ declare function hkdf(ikm: Uint8Array<ArrayBuffer>, salt: Uint8Array<ArrayBuffer
* @param algorithm the hash algorithm to be used; default is SHA-256
* @returns the hash value
*/
declare function hash(data: Uint8Array<ArrayBuffer>, length?: number, algorithm?: string): Promise<Uint8Array<ArrayBuffer>>;
declare function hash(data: Uint8Array<ArrayBuffer>, length?: number, algorithm?: AlgorithmIdentifier): Promise<Uint8Array<ArrayBuffer>>;
/**
* Hash-Based Message Authentication Code function
* @function hmac
Expand Down
15 changes: 8 additions & 7 deletions dist/main/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ Protocol written in [TypeScript](https://developer.mozilla.org/en-US/docs/Glossa
and compiled to [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript),
to support the development of Whiteflag-enabled applications in JavaScript.

The `@whiteflagprotocol/main` package provides all classes and functions
required to implement the Whiteflag protocol. Normally this should be
the only dependency for projects implementing Whiteflag.
The [`@whiteflagprotocol/main`](https://www.npmjs.com/package/@whiteflagprotocol/main)
package provides all classes and functions required to implement the Whiteflag
protocol. This should normally be the only dependency for projects
implementing Whiteflag.

This description provides a generic overview of the Whiteflag main package.
Please refer to the [WFJSL TypeDoc documentation](https://js.whiteflagprotocol.org/typedoc)
for a detailed description of all classes and functions.

## Whiteflag message class

The Whiteflag message class `WfMessage` defined in the `main` module
The Whiteflag message class `WfMessage` defined in the `message` module
represents a Whiteflag message.

This class extends the core Whiteflag message class `WfCoreMessage` by adding
Expand All @@ -31,8 +32,8 @@ factory method. For example, creating a new FreeText message (message
code `F`) and set the `Text` field, may be done as follows:

```{javascript}
let wfMessage = new WfCoreMessage('F');
WfCoreMessage.set('Text', 'Example text to be sent with the FreeText message');
let wfMessage = new WfMessage('F');
wfMessage.set('Text', 'Example text to be sent with the FreeText message');
```

The `encode()` method encodes the message. It automatically verifies the fields
Expand All @@ -52,7 +53,7 @@ static factory methods such as `fromHex(...)` or `fromU8a(...)`, since the
message type is probably not known before decoding.

```{javascript}
wfMessage = await WfCoreMessage.fromHex(hexMessage);
wfMessage = await WfMessage.fromHex(hexMessage);
```

Encryption and decryption is automatically performed upon encoding and
Expand Down
11 changes: 6 additions & 5 deletions dist/util/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ Protocol written in [TypeScript](https://developer.mozilla.org/en-US/docs/Glossa
and compiled to [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript),
to support the development of Whiteflag-enabled applications in JavaScript.

The `@whiteflagprotocol/util` package provides common utilities for other
Whiteflag packages. These utilities include common data conversions, generic
helper functions, etc. for other Whiteflag packages. It should normally not be
necessary to add this package as a dependency, but its functionality might be
useful for other purposes.
The [`@whiteflagprotocol/util`](https://www.npmjs.com/package/@whiteflagprotocol/util)
package provides common utilities for other Whiteflag packages. These
utilities include common data conversions, generic helper functions, etc.
for other Whiteflag packages. It should normally not be necessary to add this
package as a dependency, but its functionality might be useful for other
purposes.

This description provides a generic overview of the WFJSL utility package.
Please see the [WFJSL TypeDoc documentation](https://js.whiteflagprotocol.org/typedoc)
Expand Down
Binary file added docs/favicon.ico
Binary file not shown.
17 changes: 9 additions & 8 deletions docs/md/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

## Overview

The `@whiteflagprotocol/core` package provides the modules that define
Whiteflag core protocol features as specified in the Whiteflag standard.
As such, this package is not a fully functional implementation of the
protocol, but separates core protocol functions from implementation-specific
design decisions. Therefore, this package is not intended to be used directly
by implementations of Whiteflag; instead, the `@whiteflagprotocol/main` should
be used.
The [`@whiteflagprotocol/core`](https://www.npmjs.com/package/@whiteflagprotocol/core)
package provides the modules that define Whiteflag core protocol features as
specified in the Whiteflag standard. As such, this package is not a fully
functional implementation of the protocol, but separates core protocol
functions from implementation-specific design decisions. Therefore, this
package is not intended to be used directly by implementations of Whiteflag;
instead, the [`@whiteflagprotocol/main`](https://www.npmjs.com/package/@whiteflagprotocol/main)
package should be used.

This description provides a generic overview of the Whiteflag core package.
Please refer to the [WFJSL TypeDoc documentation](../typedoc) for a detailed
Expand All @@ -32,7 +33,7 @@ code `F`) and set the `Text` field, may be done as follows:

```{javascript}
let wfMessage = new WfCoreMessage('F');
WfCoreMessage.set('Text', 'Example text to be sent with the FreeText message');
wfMessage.set('Text', 'Example text to be sent with the FreeText message');
```

The `encode()` method encodes the message. The `WfCoreMessage` class
Expand Down
7 changes: 4 additions & 3 deletions docs/md/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

## Overview

The `@whiteflagprotocol/crypto` package provides cryptographic functions for
other Whiteflag packages. Therefore, it should normally not be necessary to
add this package as a dependency.
The [`@whiteflagprotocol/crypto`](https://www.npmjs.com/package/@whiteflagprotocol/crypto)
package provides cryptographic functions for other Whiteflag packages.
Therefore, it should normally not be necessary to add this package as a
dependency.

The WFJSL uses the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)
for the basic implementation of Whiteflag cryptographic functions, such as
Expand Down
13 changes: 7 additions & 6 deletions docs/md/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

## Overview

The `@whiteflagprotocol/main` package provides all classes and functions
required to implement the Whiteflag protocol. Normally this should be
the only dependency for projects implementing Whiteflag.
The [`@whiteflagprotocol/main`](https://www.npmjs.com/package/@whiteflagprotocol/main)
package provides all classes and functions required to implement the Whiteflag
protocol. This should normally be the only dependency for projects
implementing Whiteflag.

This description provides a generic overview of the Whiteflag main package.
Please refer to the [WFJSL TypeDoc documentation](../typedoc) for a detailed
Expand All @@ -28,8 +29,8 @@ factory method. For example, creating a new FreeText message (message
code `F`) and set the `Text` field, may be done as follows:

```{javascript}
let wfMessage = new WfCoreMessage('F');
WfCoreMessage.set('Text', 'Example text to be sent with the FreeText message');
let wfMessage = new WfMessage('F');
wfMessage.set('Text', 'Example text to be sent with the FreeText message');
```

The `encode()` method encodes the message. It automatically verifies the fields
Expand All @@ -49,7 +50,7 @@ static factory methods such as `fromHex(...)` or `fromU8a(...)`, since the
message type is probably not known before decoding.

```{javascript}
wfMessage = await WfCoreMessage.fromHex(hexMessage);
wfMessage = await WfMessage.fromHex(hexMessage);
```

Encryption and decryption is automatically performed upon encoding and
Expand Down
11 changes: 6 additions & 5 deletions docs/md/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

## Overview

The `@whiteflagprotocol/util` package provides common utilities for other
Whiteflag packages. These utilities include common data conversions, generic
helper functions, etc. for other Whiteflag packages. It should normally not be
necessary to add this package as a dependency, but its functionality might be
useful for other purposes.
The [`@whiteflagprotocol/util`](https://www.npmjs.com/package/@whiteflagprotocol/util)
package provides common utilities for other Whiteflag packages. These
utilities include common data conversions, generic helper functions, etc.
for other Whiteflag packages. It should normally not be necessary to add this
package as a dependency, but its functionality might be useful for other
purposes.

This description provides a generic overview of the Whiteflag utility package.
Please refer to the [TypeDoc documentation](../typedoc) for a detailed
Expand Down
Loading