# Chain Connection

The Chain Connection establishes a secure onchain execution context for a workflow. It defines which network, will be used to execute all subsequent Web3 actions.

Every workflow that performs onchain operations—such as token transfers, swaps, or contract calls must begin with a Chain Connection node.

### Available Module

#### Chain Connection

Initialises a wallet session for the workflow and makes it available to downstream Web3 nodes.

***

### When to Use Chain Connection

Use this node when your workflow:

* Executes any onchain transaction
* Signs messages or transactions
* Transfers tokens or native assets
* Interacts with smart contracts

It should always be placed before other Web3 nodes.

***

### Adding Chain Connection to a Workflow

1. Open the Decimal workflow editor
2. Add a Trigger node
3. From Web3, select Chain Connection
4. Connect it directly after the trigger

***

### Module Configuration

#### Wallet Type

Defines the wallet execution model. This is default set to the sub-wallet. This is to ensure that the entire workflow is autonomous.

Example:

*<mark style="color:$primary;">Subwallet Auto</mark>*

This automatically manages a subwallet for secure execution without exposing private keys.

***

#### Network

Select the blockchain network where all subseqent web3 transactions will be executed.

Example:

*<mark style="color:$primary;">Base</mark>*

The selected network applies to all downstream Web3 actions unless overridden.

***

### Output & Execution Context

Once configured, Wallet Connection:

* Establishes a signing context
* Binds the wallet to the workflow
* Enables downstream nodes to execute transactions

No explicit output variable is required—this node sets execution state.

***

### Example Workflow

Use Case: Prepare a workflow for onchain execution.

Workflow:

1. Trigger
2. Chain Connection
3. Transfer Funds / 1inch / Smart Contract Function

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.decimal.at/technical/node-directory/chain-connection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
