{
  "iface": "futoin.enclave.ext.backend",
  "version": "1.0",
  "ftn3rev": "1.8",
  "inherit": "futoin.enclave.backend:1.0",
  "types": {
    "TelemetryTraits": {
      "type": "map",
      "elemtype": "string",
      "desc": "Implementation-defined telemetry"
    },
    "DeviceConfig": {
      "type": "map",
      "elemtype": "string",
      "desc": "Implementation-defined dynamic configuration"
    },
    "ExtHelloResponse": {
      "type": "map",
      "fields": {
        "sess_id": "SessionID",
        "pub_key": "PublicKey",
        "cfg": {
          "type": "DeviceConfig",
          "optional": true
        }
      }
    }
  },
  "funcs": {
    "hello": {
      "params": {
        "device_id": "DeviceID",
        "instance_id": "InstanceID",
        "pub_key": {
          "type": "PublicKey",
          "desc": "Enclave-generated execution environment-bound PublicKey"
        },
        "prev_sess_id": {
          "type": "SessionID",
          "desc": "Previous SessionID, if known",
          "default": null
        },
        "ts": "MicroTimestamp",
        "traits": {
          "type": "TelemetryTraits",
          "default": null
        }
      },
      "result": "ExtHelloResponse",
      "throws": [
        "TimeDrift"
      ],
      "desc": "Initialize the communication channel"
    }
  },
  "requires": [
    "BiDirectChannel",
    "SecureChannel",
    "MessageSignature"
  ],
  "desc": "FutoIn Enclave Extended Backend interface"
}