Workflows

Prepare a Manual workflow for one owner-signed batch

Changed on

Resolve existing read/check nodes, capture the terminal ContractWrite calls, and build/price one MA v2 batch without signing or broadcasting. Requires the concrete owner's Bearer JWT and a registered supported source wallet. Current on-chain owner, implementation and gas funding are checked independently of the stored wallet association. Derived wallets require the verified factory personal_sign build 0x000000000000c5A9089039570Dd36455b5C07383. An EOA source must already be delegated to the pinned SMA-7702 1.0.0 implementation, registered as kind=eoa_7702, and enabled by eoa_7702_execute on Sepolia or Base. EOA operations use sender=owner and omit factory deployment fields. Delegation is a separate explicit wallet action; prepare never installs delegation or a session grant. Both account kinds use personal_sign of the 32 raw userOpHash bytes, owner nonce entity 0/global option 1. A canonical delegated EOA can also sign for its derived smart wallet. Up to 32 calls; no native value, write Loop or post-write nodes. Unsigned preparations are capped at 64 per owner. Submitted, uncertain, rejected, and unsent records do not consume that cap. A gateway with owner execution disabled returns 403 OWNER_EXECUTION_DISABLED; preparing again does not enable it. Other precondition failures return 412 and ask for a fresh prepare. Ordinary Auto/session and simulate behavior is unchanged.

post/workflows:prepare

Request

  • Base URL
    https://api.avaprotocol.org/api/v1
  • Auth
    HTTP bearer

Request body

chainIdinteger required

Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.

inputVariablesInputVariables required

Free-form key-value bag of values used to resolve {{variable.path}} template references inside trigger and node configs. Conventional well-known keys: settings.runner (smart wallet address), settings.chainId (chain id). camelCase keys; back-compat support for snake_case keys exists during the migration window.

Example request

{
  "chainId": 11155111,
  "trigger": {
    "config": {
      "chainId": 11155111
    }
  },
  "nodes": [
    {
      "config": {
        "destination": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
        "chainId": 11155111
      }
    }
  ]
}

Response

Priced operation awaiting an owner signature; no transaction has been submitted.

userOpHashstring required

32-byte hex hash (UserOp hash, transaction hash).

ownerstring required

Lowercase or checksummed hex EOA / contract address.

chainIdinteger required

Numeric chain ID (e.g. 11155111 for Sepolia, 8453 for Base). On chain-aware trigger/node configs this is required and must be a configured chain; on query/filter params it is optional.

entryPointstring required

Lowercase or checksummed hex EOA / contract address.

signingMethod'personal_sign' required

Sign the 32 raw bytes of userOpHash, with the EIP-191 prefix applied once; ethers signMessage(getBytes(userOpHash)). Offered only for the verified alchemy.sma-bytecode.1.0.0 implementation.

expiresAtinteger required

Gateway continuation deadline, Unix milliseconds (10 minutes). This is not an on-chain signature expiry or revocation mechanism.

writeNodeIdstring required
gasFunding'source' | 'sponsored' required

Final funding choice; sponsorship refusal never silently charges the source.

maxGasCostWeistring required

Signed maximum gas cost in decimal wei, before any paymaster sponsorship.

Example response

{
  "execution": {
    "id": "01JG2FE5MDVKBPHEG0PEYSDKAC",
    "workflowId": "01JG2FE5MDVKBPHEG0PEYSDKAC",
    "chainId": 11155111,
    "steps": [
      {
        "errorDetails": {
          "token": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
        }
      }
    ],
    "authorization": {
      "missingActions": [
        {
          "target": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
        }
      ],
      "missingTokens": [
        "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
      ],
      "required": {
        "allowedActions": [
          {
            "target": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
          }
        ],
        "erc20SpendCaps": [
          {
            "token": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
            "amount": "500000000"
          }
        ],
        "nativeRecipients": [
          "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
        ],
        "nativeSpendCap": {
          "amount": "10000000000000000"
        }
      }
    }
  },
  "userOperation": {
    "sender": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
    "factory": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
    "paymaster": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
  },
  "userOpHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "owner": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
  "chainId": 11155111,
  "entryPoint": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB",
  "calls": [
    {
      "to": "0x82F2Dd9a552a69f2ceD7Ff2D05c43aB8430158FB"
    }
  ]
}

Changes

    • info

      added the new optional request property ////////

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      endpoint added