{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/immutable/main/json-schema/immutable-sign-crafting-request-schema.json",
  "title": "SignCraftingRequest",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/immutable-crafting-api-openapi.yml#/components/schemas/SignCraftingRequest",
  "type": "object",
  "properties": {
    "multi_caller": {
      "type": "object",
      "properties": {
        "address": {
          "$ref": "#/$defs/Address"
        },
        "name": {
          "type": "string",
          "description": "The name of the multicaller contract"
        },
        "version": {
          "type": "string",
          "description": "The version of the multicaller contract"
        }
      },
      "required": [
        "address",
        "name",
        "version"
      ]
    },
    "reference_id": {
      "type": "string",
      "description": "The id of this request in the system that originates the crafting request, specified as a 32 byte hex string"
    },
    "calls": {
      "type": "array",
      "description": "The calls to be signed",
      "items": {
        "$ref": "#/$defs/Call"
      },
      "minLength": 1,
      "maxLength": 100
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "The expiration time of the request"
    }
  },
  "required": [
    "multi_caller",
    "reference_id",
    "calls",
    "expires_at"
  ],
  "$defs": {
    "Address": {
      "x-go-type": "common.Address",
      "x-go-type-import": {
        "path": "github.com/ethereum/go-ethereum/common",
        "name": "common"
      },
      "description": "An Ethereum address",
      "type": "string",
      "pattern": "^0x[a-fA-F0-9]{40}$"
    },
    "Call": {
      "type": "object",
      "properties": {
        "target_address": {
          "$ref": "#/$defs/Address"
        },
        "function_signature": {
          "type": "string",
          "description": "The function signature"
        },
        "function_args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The function arguments"
        }
      },
      "required": [
        "target_address",
        "function_signature",
        "function_args"
      ]
    }
  }
}