> For the complete documentation index, see [llms.txt](https://mimic-api.gitbook.io/mimic-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mimic-api.gitbook.io/mimic-api-docs/bridge/bridges-prepare.md).

# /bridges/prepare

Computes EIP-712 data to be signed to move a token from one chain to another. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /bridges/{id}/execute`.

```json
{"openapi":"3.1.0","info":{"title":"Mimic API","version":"0.0.1-rc"},"tags":[{"name":"Bridge","description":"Cross-chain token transfers. Compute EIP-712 data to sign via `POST /bridges/prepare`, then submit the signature via `POST /bridges/{id}/execute`."}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"API key for your Mimic account. Required for every operation except the public reference-data endpoints."}},"schemas":{"Chain":{"type":"string","description":"Identifier of a chain supported by the API.","pattern":"^[a-z0-9-]+$"},"Address":{"type":"string","description":"A valid address on the relevant chain. Format depends on the chain: 0x-prefixed 20-byte hex for EVM chains, base58 for other chains (e.g. Solana, Tron)."},"SlippageBps":{"type":"integer","description":"Maximum slippage to accept on the amount received, in basis points (e.g. 50 = 0.50%).","minimum":0,"maximum":10000},"UUID":{"type":"string","format":"uuid","description":"Identifier for an action request, returned by `POST /{action}/prepare` and used to submit its signature and track its status."},"Timestamp":{"type":"integer","title":"Unix timestamp (ms)","description":"Unix timestamp in milliseconds."},"TriggerSignaturePayload":{"type":"object","description":"EIP-712 data to be signed to authorize a function execution.","required":["domain","primaryType","types","values"],"properties":{"domain":{"$ref":"#/components/schemas/TriggerDomain"},"primaryType":{"type":"string"},"types":{"$ref":"#/components/schemas/TriggerTypes"},"values":{"$ref":"#/components/schemas/TriggerTypedDataValues"}}},"TriggerDomain":{"type":"object","required":["name","version"],"properties":{"name":{"type":"string"},"version":{"type":"string"}}},"TriggerTypes":{"type":"object","required":["Input","Config","Trigger"],"description":"EIP-712 type definitions for the trigger's typed data.","properties":{"Input":{"type":"array","items":{"$ref":"#/components/schemas/TypedDataField"}},"Config":{"type":"array","items":{"$ref":"#/components/schemas/TypedDataField"}},"Trigger":{"type":"array","items":{"$ref":"#/components/schemas/TypedDataField"}}}},"TypedDataField":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","description":"Solidity type or a custom type (`Token`, `TokenAmount`)."}}},"TriggerTypedDataValues":{"type":"object","required":["functionCid","version","input","config","executionFeeLimit","minValidations"],"properties":{"functionCid":{"$ref":"#/components/schemas/CID"},"version":{"$ref":"#/components/schemas/SemVer"},"input":{"type":"object","description":"Key-value map matching the function's manifest input schema."},"config":{"$ref":"#/components/schemas/TriggerConfig"},"executionFeeLimit":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Maximum fee (in protocol units) the signer accepts per execution."},"minValidations":{"type":"integer","description":"Minimum number of validator confirmations required."}}},"CID":{"type":"string","description":"An IPFS content identifier (CIDv0 or CIDv1 base32)."},"SemVer":{"type":"string","description":"A semantic version string."},"TriggerConfig":{"description":"Trigger schedule configuration. Discriminated by the integer `type` field: `0` → CronTriggerConfig, `1` → EventTriggerConfig, `2` → OnceTriggerConfig.\n","oneOf":[{"$ref":"#/components/schemas/CronTriggerConfig"},{"$ref":"#/components/schemas/EventTriggerConfig"},{"$ref":"#/components/schemas/OnceTriggerConfig"}]},"CronTriggerConfig":{"type":"object","required":["type","schedule","delta","endDate"],"properties":{"type":{"type":"integer","enum":[0]},"schedule":{"$ref":"#/components/schemas/CronExpression"},"delta":{"type":"string","description":"A time delta string."},"endDate":{"$ref":"#/components/schemas/Timestamp"}}},"CronExpression":{"type":"string","title":"Cron expression (UTC)","description":"A standard 5-field cron expression, in order: minute, hour, day of month, month, day of week. Evaluated in UTC."},"EventTriggerConfig":{"type":"object","required":["type","chain","contract","topics","delta","endDate"],"properties":{"type":{"type":"integer","enum":[1]},"chainId":{"$ref":"#/components/schemas/ChainId"},"contract":{"description":"Contract address to filter events from, or `\"any\"` for any contract.","oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"string","enum":["any"]}]},"topics":{"type":"array","description":"Array of 1–4 topic groups. Each group is an OR filter; groups are AND-combined.\n","minItems":1,"maxItems":4,"items":{"type":"array","items":{"$ref":"#/components/schemas/HexString"}}},"delta":{"type":"string","description":"Time delta after the event before execution fires."},"endDate":{"$ref":"#/components/schemas/Timestamp"}}},"ChainId":{"type":"integer","description":"Numeric EVM chain ID. Used only inside raw transactions and on-chain trigger payloads that must be signed with it; elsewhere the API identifies chains by `Chain`."},"HexString":{"type":"string","description":"An arbitrary 0x-prefixed hex string."},"OnceTriggerConfig":{"type":"object","required":["type","startDate","delta","endDate"],"properties":{"type":{"type":"integer","enum":[2]},"startDate":{"$ref":"#/components/schemas/Timestamp"},"delta":{"type":"string","description":"Duration window; `endDate` must equal `startDate + delta`."},"endDate":{"$ref":"#/components/schemas/Timestamp"}}},"BigInteger":{"type":"string","description":"A non-negative integer represented as a string."},"MaxFeeUsd":{"type":"string","description":"Maximum fee to cover the cost of each on-chain transaction, in USD, as a decimal string. A transaction whose fee would exceed this value is not executed."},"TransactionRequest":{"type":"object","description":"An unsigned raw transaction that must be signed before it can be submitted.","required":["chainId","from","to","nonce","data","value","gasLimit","maxFeePerGas","maxPriorityFeePerGas"],"properties":{"chainId":{"allOf":[{"$ref":"#/components/schemas/ChainId"}],"description":"Chain ID this transaction must be signed and submitted on."},"from":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Address this transaction is sent from."},"to":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Token contract address to call."},"nonce":{"type":"integer","description":"Account nonce to use for this transaction."},"data":{"allOf":[{"$ref":"#/components/schemas/HexString"}],"description":"ABI-encoded calldata for `approve(spender, amount)`."},"value":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Native token value to send with the transaction, in wei. Always `\"0\"`."},"gasLimit":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Gas limit for this transaction."},"maxFeePerGas":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Maximum total fee per gas unit, in wei."},"maxPriorityFeePerGas":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Maximum priority fee per gas unit, in wei."}}},"SafeguardSignaturePayload":{"type":"object","description":"EIP-712 data to be signed to authorize the safeguards that restrict what Mimic may do with the wallet. The safeguard allows swaps that pay out to the wallet itself and denies every other kind of operation.","required":["domain","primaryType","types","values"],"properties":{"domain":{"$ref":"#/components/schemas/SettlerDomain"},"primaryType":{"type":"string"},"types":{"type":"object","required":["SafeguardAuthorization"],"properties":{"SafeguardAuthorization":{"type":"array","items":{"$ref":"#/components/schemas/TypedDataField"}}}},"values":{"type":"object","required":["user","safeguard","nonce","deadline"],"properties":{"user":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Wallet the safeguard belongs to."},"safeguard":{"allOf":[{"$ref":"#/components/schemas/HexString"}],"description":"Encoded safeguard configuration."},"nonce":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Unique value preventing this authorization from being replayed."},"deadline":{"allOf":[{"$ref":"#/components/schemas/BigInteger"}],"description":"Unix timestamp in seconds by which the safeguard must be set."}}}}},"SettlerDomain":{"type":"object","description":"EIP-712 domain of the settler contract the safeguard is set on.","required":["name","version","chainId","verifyingContract"],"properties":{"name":{"type":"string"},"version":{"type":"string"},"chainId":{"allOf":[{"$ref":"#/components/schemas/ChainId"}],"description":"Chain of the settler this authorization applies to."},"verifyingContract":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Settler contract address."}}},"Error":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ActionPrepared":{"description":"EIP-712 data to be signed to create the action, along with the approvals and safeguards it requires.","content":{"application/json":{"schema":{"type":"object","required":["id","signBefore","signaturePayload","executionCost","requiredApprovals","policies"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/UUID"}],"description":"ID for this action. Submit the signature via `POST /{action}/{id}/execute` and track its status via `GET /{action}/{id}`."},"signBefore":{"allOf":[{"$ref":"#/components/schemas/Timestamp"}],"description":"Deadline for submitting the signature via `POST /{action}/{id}/execute`. Past it the payload is no longer accepted, and a fresh one must be requested from `POST /{action}/prepare`."},"signaturePayload":{"$ref":"#/components/schemas/TriggerSignaturePayload"},"executionCost":{"type":"object","description":"Estimated cost per execution for this action.","required":["estimatedUsdPerExecution","maxUsdPerExecution"],"properties":{"estimatedUsdPerExecution":{"type":"string","description":"Estimated fee for each on-chain transaction, in USD, as a decimal string."},"maxUsdPerExecution":{"allOf":[{"$ref":"#/components/schemas/MaxFeeUsd"}],"description":"The maximum fee applied per execution, derived from `estimatedUsdPerExecution`. If the fee of a given execution would exceed this value, that execution is skipped."}}},"requiredApprovals":{"type":"array","description":"Raw `approve()` transactions authorizing the settler to spend the tokens this action moves, which must be signed and submitted alongside the action signature via `POST /{action}/{id}/execute`. Empty when no approvals are required.","items":{"$ref":"#/components/schemas/TransactionRequest"}},"policies":{"type":"array","description":"EIP-712 payloads authorizing the safeguards that restrict what Mimic may do with this wallet. Each must be signed and submitted as `signedPolicies` via `POST /{action}/{id}/execute`. Empty when the wallet is already safeguarded.","items":{"$ref":"#/components/schemas/SafeguardSignaturePayload"}}}}}}},"BadRequest":{"description":"Bad request — invalid parameters or body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Unauthorized — missing or invalid credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/bridges/prepare":{"post":{"tags":["Bridge"],"description":"Computes EIP-712 data to be signed to move a token from one chain to another. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /bridges/{id}/execute`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sourceChain","destinationChain","token","amount","wallet","slippageBps"],"properties":{"sourceChain":{"allOf":[{"$ref":"#/components/schemas/Chain"}],"description":"Chain to bridge the token from."},"destinationChain":{"allOf":[{"$ref":"#/components/schemas/Chain"}],"description":"Chain to receive the token on."},"token":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Token to bridge. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token."},"amount":{"type":"string","description":"Amount of token to bridge, as a decimal string."},"wallet":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Address from where the funds will be pulled."},"slippageBps":{"$ref":"#/components/schemas/SlippageBps"},"recipient":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Address that receives the token on destinationChain. Defaults to `wallet`."}}}}}},"responses":{"200":{"$ref":"#/components/responses/ActionPrepared"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mimic-api.gitbook.io/mimic-api-docs/bridge/bridges-prepare.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
