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

# Full Integration Guide

> Choose between TrustedProposer and TrustlessProposer and integrate DA Builder into a production transaction sender.

## Summary

DA Builder supports two EIP-7702 integration paths: `TrustedProposer` for fast setup and `TrustlessProposer` for account-owner authorization on every delegated call.

## Choose An Integration Path

Start with `TrustedProposer` unless your application already requires account-owner authorization for every delegated call.

| Path                | Use this when                                                    | Do not use this when                                              | Integration work                                                                          | Security model                                                                                       |
| :------------------ | :--------------------------------------------------------------- | :---------------------------------------------------------------- | :---------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------- |
| `TrustedProposer`   | You need the fastest way to test DA Builder with a dedicated EOA | The EOA controls assets, admin permissions, or protocol authority | Delegate to Spire's `TrustedProposer`, switch RPC, fund GasTank                           | The EOA trusts Spire's DA Builder service with delegated execution                                   |
| `TrustlessProposer` | Every delegated call must be authorized by the account owner     | You need a no-code or minimal-code trial                          | Delegate to `TrustlessProposer`, switch RPC, fund GasTank, sign EIP-712 proposer payloads | DA Builder aggregates calls, but the proposer contract verifies owner authorization before execution |

## Network Configuration

| Network | TrustedProposer                              | TrustlessProposer                            | GasTank                                      | RPC                                     |
| :------ | :------------------------------------------- | :------------------------------------------- | :------------------------------------------- | :-------------------------------------- |
| Mainnet | `0xC09f597034f654283a05B058EE1306534b837868` | `0x1b3068A7dC934cCEBF7784cBd9266D80948a98A1` | `0x2565c0A726cB0f2F79cd16510c117B4da6a6534b` | `https://da-builder.mainnet.spire.dev/` |
| Sepolia | `0x9ccc2f3ecdE026230e11a5c8799ac7524f2bb294` | `0x51922A1e2A010418bD709870Cd1ff13615070fa8` | `0x18Fa15ea0A34a7c4BCA01bf7263b2a9Ac0D32e92` | `https://da-builder.sepolia.spire.dev/` |

## TrustedProposer Workflow

`TrustedProposer` is the fastest way to use DA Builder. The transaction sender can keep submitting normal signed transactions after setup.

1. Create or choose a dedicated EOA.
2. Deposit ETH into the Spire GasTank for that EOA.
3. Submit an EIP-7702 authorization that delegates the EOA to Spire's `TrustedProposer`.
4. Send transaction submissions to the DA Builder RPC endpoint.
5. Store the returned transaction hash.
6. Poll `eth_getTransactionReceipt` or `dab_transactionStatus`.
7. Use direct RPC fallback for outages, unsupported methods, or non-aggregated operational paths.

### TrustedProposer Delegation With Foundry

```bash theme={null}
#!/usr/bin/env bash
set -euo pipefail

RPC_URL="https://da-builder.mainnet.spire.dev/"
DELEGATE="0xC09f597034f654283a05B058EE1306534b837868"

SIGNED_AUTH="$(cast wallet sign-auth "$DELEGATE" \
  --private-key "$EOA_PK" \
  --rpc-url "$RPC_URL")"

cast send "$(cast az)" \
  --private-key "$EOA_PK" \
  --auth "$SIGNED_AUTH" \
  --rpc-url "$RPC_URL"
```

## TrustlessProposer Workflow

`TrustlessProposer` is for applications that need DA Builder aggregation without trusting Spire to choose arbitrary delegated execution.

1. Delegate the EOA to `TrustlessProposer`.
2. Fund the Spire GasTank.
3. Update the application to sign proposer call payloads.
4. Submit the signed proposer call through DA Builder.
5. Poll status and implement direct RPC fallback.

### IProposer Interface

```solidity theme={null}
interface IProposer {
    function onCall(address _target, bytes calldata _data, uint256 _value) external returns (bool);
}
```

### TrustlessProposer Security Requirements

| Requirement          | Purpose                                                           |
| :------------------- | :---------------------------------------------------------------- |
| EIP-712 signature    | Confirms the account owner authorized the delegated call          |
| Nonce                | Prevents replay attacks                                           |
| Deadline             | Prevents stale transactions                                       |
| Gas limit            | Prevents unexpected delegated execution cost                      |
| Fixed storage layout | Reduces EIP-7702 storage collision risk when account code changes |

For a complete implementation, see [TrustlessProposer.sol↗](https://github.com/spire-labs/da-builder-sample-integration/blob/main/src/proposers/TrustlessProposer.sol).

### TrustlessProposer Delegation With Foundry

```bash theme={null}
#!/usr/bin/env bash
set -euo pipefail

RPC_URL="https://da-builder.mainnet.spire.dev/"
DELEGATE="0x1b3068A7dC934cCEBF7784cBd9266D80948a98A1"

SIGNED_AUTH="$(cast wallet sign-auth "$DELEGATE" \
  --private-key "$EOA_PK" \
  --rpc-url "$RPC_URL")"

cast send "$(cast az)" \
  --private-key "$EOA_PK" \
  --auth "$SIGNED_AUTH" \
  --rpc-url "$RPC_URL"
```

### TrustlessProposer Example Call

This example builds the exact calldata shape used by `TrustlessProposer.onCall(...)` and uses `ethers v6`.

```ts theme={null}
import { AbiCoder, Interface, Wallet, ethers } from "ethers";

const trustlessProposerAbi = [
  "function nestedNonce() view returns (uint256)",
  "function onCall(address target, bytes data, uint256 value) returns (bool)",
];

const greeterAbi = ["function setGreeting(string greeting)"];

const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const signer = new Wallet(process.env.PRIVATE_KEY!, provider);

const trustlessProposerAddress = "0x1b3068A7dC934cCEBF7784cBd9266D80948a98A1";
const greeterAddress = "0xYourPublicGreeterAddress";
const chainId = 1;
const gasLimit = 1_000_000n;
const deadline = 999_999_999_999n;
const value = 0n;

const trustlessProposer = new ethers.Contract(
  trustlessProposerAddress,
  trustlessProposerAbi,
  provider,
);

const greeter = new Interface(greeterAbi);
const greeting = "hello from DA Builder";
const calldata = greeter.encodeFunctionData("setGreeting", [greeting]);
const nonce = await trustlessProposer.nestedNonce();

// The signer must control the delegated EOA.
const signature = await signer.signTypedData(
  {
    name: "TrustlessProposer",
    version: "1",
    chainId,
    verifyingContract: trustlessProposerAddress,
  },
  {
    Call: [
      { name: "deadline", type: "uint256" },
      { name: "nonce", type: "uint256" },
      { name: "target", type: "address" },
      { name: "value", type: "uint256" },
      { name: "calldata", type: "bytes" },
      { name: "gasLimit", type: "uint256" },
    ],
  },
  {
    deadline,
    nonce,
    target: greeterAddress,
    value,
    calldata,
    gasLimit,
  },
);

const encodedData = AbiCoder.defaultAbiCoder().encode(
  ["bytes", "uint256", "uint256", "bytes", "uint256"],
  [signature, deadline, nonce, calldata, gasLimit],
);

const functionCall = new Interface(trustlessProposerAbi).encodeFunctionData("onCall", [
  greeterAddress,
  encodedData,
  value,
]);

const tx = await signer.sendTransaction({
  to: trustlessProposerAddress,
  data: functionCall
});

const receipt = await tx.wait();
console.log(receipt?.status);

```

## Next Steps

* [Quick Reference](/da-builder/quick-reference) - Endpoints, methods, examples, and auth.
* [Architecture](/da-builder/architecture) - Component responsibilities and trust boundaries.
* [Monitor Account](/da-builder/monitor-account) - Balance and status monitoring.
* [AI Agent Integration](/da-builder/ai-agent-integration) - Instructions for autonomous coding agents.
