Architecture

  Your App
  +-------------------------------------------------+
  |                                                 |
  |   EVM Wallet (Wagmi)       Miden Wallet         |
  |        |                        |               |
  |        v                        v               |
  |   +--------------------------------------+      |
  |   |        Epoch Intent SDK              |      |
  |   |   Builds intents, manages collateral |      |
  |   +--------------------------------------+      |
  +---------|--------------------|------------------+
            |                    |
            v                    v
  +----------------+    +----------------+
  | The Compact    |    |   Allocator    |
  | (EVM contract) |    |                |----> SIO (Solver Network)
  +----------------+    +----------------+            |
                                                      v
                                              Solvers execute
                                              cross-chain txns

Your app integrates the Epoch Intent SDK. The SDK takes two inputs β€” an EVM wallet client and intent parameters β€” and handles everything else: collateral management, allocator communication, and solver coordination.

For Miden-sourced intents, the SDK calls back into your app to lock tokens on Miden (via a P2IDE notearrow-up-right). Your app provides this callback; the SDK tells you when to call it, how much to lock, and who to send it to.

Components

Epoch Intent SDK

The primary integration point. You initialize it with an allocator URL and an EVM wallet client, then call two methods:

  • getTaskData() β€” encodes your intent parameters (source token, destination token, amount, recipient, chain)

  • solveIntent() β€” executes the full flow: locks collateral, submits to the allocator, triggers solver execution

For Miden-to-EVM, solveIntent accepts a createMidenP2IDNote callback that the SDK calls when it needs your app to lock Miden tokens as collateral.

Allocator

Backend service the SDK communicates with. Receives signed intents, submits them to the solver network, and exposes status endpoints. Also holds a Miden account that receives P2IDE notes from users during bridging.

Endpoint
Purpose

POST /compact

Submit a signed intent

POST /checkIfDepositNeeded

Check if collateral lock is required

GET /intentStatus/:address/:nonce

Poll execution status

GET /miden-recipient

Get allocator's Miden account ID

GET /suggested-nonce/:chainId/:address

Get next nonce

The Compact

EVM smart contract (0x00000000000000171ede64904551eeDF3C6C9788) that holds token deposits as collateral. Used in EVM-to-Miden flow, the SDK deposits tokens here automatically when you call solveIntent with collateralType: 'evm'.

SIO (Solver Network)

Matches intents with solvers who execute them across chains. Your app never talks to SIO directly; the allocator handles this.