Skip to content

Defined in: packages/wire/src/artifact-format.ts:51

One module’s binary artifact: the prelude every decoder runs before it reads its own header, and the framing every encoder applies after it has built its own sections.

Kind extends string

Failure extends KnotkitError

readonly failures: WireFailureFactories<Failure>

Defined in: packages/wire/src/artifact-format.ts:53

The module’s parse-error factory for every wire failure reason, for the wire guards and readers.


readonly serialize: (build, options?) => Uint8Array

Defined in: packages/wire/src/artifact-format.ts:60

Run build and frame its payload under this format’s magic and payload version.

() => ArtifactPayload

ArtifactSerializeOptions

Uint8Array

The module’s invalid-input error for every wire caller-contract failure raised by build or by the framing; any other error is rethrown untouched.


readonly deserialize: (value) => ArtifactPayload

Defined in: packages/wire/src/artifact-format.ts:67

Validate untrusted input as this format’s envelope and return the module-owned bytes.

unknown

ArtifactPayload

The module’s parse error: wrong-format for a value that is not a Uint8Array, an envelope reason for malformed bytes, and unsupported-payload-version for another payload version.


readonly kindTag: (kind) => number

Defined in: packages/wire/src/artifact-format.ts:69

The byte kind is written as.

Kind

number


readonly kindOf: (tag) => Kind

Defined in: packages/wire/src/artifact-format.ts:75

The kind a header’s tag byte names.

number

Kind

The module’s unknown-kind parse error for a tag no kind is written as.