> ## 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.

# actions: Compiling action programs

> Compiling action programs: the declaration and description of each of the 4 exports of @eco-incorp/sauce/actions.

`@eco-incorp/sauce/actions` reads JSON action programs (`{ version, chainId?, actions }`), validates them against the JSON Schema exported as `@eco-incorp/sauce/actions/action-program.schema.json`, and compiles them for a chain. A token field takes a registry symbol and a contract field a namespace reference, beside an address.

```typescript theme={null}
import { parseProgram, compileProgram } from "@eco-incorp/sauce/actions";
```

Generated from the type declarations of `@eco-incorp/sauce`.

### `compileProgram`

*Function* · `@eco-incorp/sauce/actions`

Compiles an action program standalone, for `options.chain` or its own `chainId`. Its `argument`
actions become runtime arguments.

```typescript theme={null}
export declare function compileProgram(program: ActionProgram, options?: CompileOptions): CompiledProgram;
```

### `ArgumentValues`

*Type* · `@eco-incorp/sauce/actions`

Runtime argument values, by `argument` name. Each is a uint256.

```typescript theme={null}
export type ArgumentValues = Readonly<Record<string, bigint | number | string>>;
```

### `CompiledProgram`

*Interface* · `@eco-incorp/sauce/actions`

```typescript theme={null}
export interface CompiledProgram {
    readonly bytecode: Uint8Array;
    readonly source: string;
    readonly contracts: ActionContracts;
    readonly parameters: readonly string[];
    readonly entryEncoding: "abi-v1";
    payload(values?: ArgumentValues): Uint8Array;
    argumentOffset(name: string): number;
}
```

### `CompileOptions`

*Interface* · `@eco-incorp/sauce/actions`

```typescript theme={null}
export interface CompileOptions {
    readonly chain?: ChainRef;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.