> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# compiler: Compact arguments codec

> Compact arguments codec: 3 exports of the compiler module of @eco-incorp/sauce, including encodeCompactArguments, decodeCompactArguments, CompactValue.

`@eco-incorp/sauce/compiler` re-exports the published compiler's `compile` and adds the compact-v1 argument codec. The compiler package itself is documented under [@eco-incorp/sauce-compiler](/sdk-reference/sauce-compiler/api).

This page covers `sdk/dist/compact-arguments.d.ts`.

<Note>
  Generated from the type declarations shipped in `@eco-incorp/sauce` 0.99.4. Each entry shows the package authors' JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments).
</Note>

### `encodeCompactArguments`

*Function* · `sdk/dist/compact-arguments.d.ts`

Encode exactly the schema returned alongside the compiled program. Scalar
negatives preserve their 256-bit two's-complement representation. Addresses and
public keys can be supplied as full-width hexadecimal integers. Bytes are raw,
unpadded bytes; collection lengths are unsigned 32-bit big-endian counts.

```typescript theme={null}
export declare function encodeCompactArguments(schema: Uint8Array, value: CompactValue): Uint8Array;
```

### `decodeCompactArguments`

*Function* · `sdk/dist/compact-arguments.d.ts`

Strict inverse for inspection and signing: rejects non-minimal scalar widths,
non-canonical booleans, malformed lengths and trailing bytes. Engine decoding
additionally validates its bounded heap allocations before exposing any value.

```typescript theme={null}
export declare function decodeCompactArguments(schema: Uint8Array, data: Uint8Array, options?: {
    maxValues?: number;
}): CompactValue;
```

### `CompactValue`

*Type* · `sdk/dist/compact-arguments.d.ts`

The compact-v1 wire format emitted by the compiler's `compactArgs` option.
Values are positional (including tuple fields). Code and schema depend only on
source/types; request values are encoded separately and never enter code caches.

```typescript theme={null}
export type CompactValue = bigint | number | boolean | string | Uint8Array | readonly CompactValue[];
```
