diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index 3b7480cf..a05b19f3 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -1847,15 +1847,6 @@ def on_get(req, rep): rep.data = json.dumps(states).encode("utf-8") -exnFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ - serdering.Vrsn_1_0 -][serdering.Ilks.exn] -EXN_V_1, EXNSchema_V_1 = dataclassFromFielddom("EXN_V_1", exnFieldDomV1) -exnFieldDomV2 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ - serdering.Vrsn_2_0 -][serdering.Ilks.exn] -EXN_V_2, EXNSchema_V_2 = dataclassFromFielddom("EXN_V_2", exnFieldDomV2) - issFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ serdering.Vrsn_1_0 ][serdering.Ilks.iss] @@ -1989,7 +1980,7 @@ def on_post(req, rep): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/OOBIOperation' """ agent = req.context.agent @@ -2175,7 +2166,7 @@ def on_post(req, rep): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/QueryOperation' 404: description: Identifier not found in Key event database diff --git a/src/keria/app/aiding.py b/src/keria/app/aiding.py index d6be25b9..5eaede13 100644 --- a/src/keria/app/aiding.py +++ b/src/keria/app/aiding.py @@ -21,6 +21,7 @@ from keri.db import basing from marshmallow import fields from marshmallow_dataclass import class_schema + from ..core import longrunning, httping from ..utils.openapi import namedtupleToEnum, dataclassFromFielddom from keri.core.serdering import Protocols, Vrsn_1_0, Vrsn_2_0, SerderKERI @@ -653,7 +654,11 @@ def on_post(req, rep): content: application/json: schema: - $ref: '#/components/schemas/Operation' + oneOf: + - $ref: '#/components/schemas/GroupOperation' + - $ref: '#/components/schemas/WitnessOperation' + - $ref: '#/components/schemas/DelegationOperation' + - $ref: '#/components/schemas/DoneOperation' 400: description: Bad request. This could be due to missing or invalid parameters. """ @@ -1026,7 +1031,12 @@ def on_post(self, req, rep, name): content: application/json: schema: - $ref: '#/components/schemas/Operation' + oneOf: + - $ref: '#/components/schemas/GroupOperation' + - $ref: '#/components/schemas/WitnessOperation' + - $ref: '#/components/schemas/DelegationOperation' + - $ref: '#/components/schemas/DoneOperation' + - $ref: '#/components/schemas/SubmitOperation' 400: description: Bad request. This could be due to missing or invalid parameters. """ @@ -1606,7 +1616,7 @@ def on_post(req, rep, name, aid=None, role=None): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/EndRoleOperation' 400: description: Bad request. This could be due to missing or invalid parameters. 404: @@ -1715,7 +1725,7 @@ def on_post(req, rep, name): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/LocSchemeOperation' 400: description: Bad request. This could be due to missing or invalid parameters. 404: @@ -2011,7 +2021,7 @@ def on_post(req, rep, source): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ChallengeOperation' """ agent = req.context.agent diff --git a/src/keria/app/credentialing.py b/src/keria/app/credentialing.py index 42336628..e05f89b7 100644 --- a/src/keria/app/credentialing.py +++ b/src/keria/app/credentialing.py @@ -359,7 +359,7 @@ def on_post(self, req, rep, name): content: application/json: schema: - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/RegistryOperation' 404: description: The requested registry is not a valid reference to an identifier. 400: @@ -715,7 +715,7 @@ def on_post(req, rep): application/json: schema: description: long running operation of credential processing - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/CredentialOperation' 404: description: Malformed ACDC or iss event """ @@ -906,7 +906,7 @@ def on_post(self, req, rep, name): content: application/json: schema: - $ref: '#/components/schemas/Credential' + $ref: '#/components/schemas/CredentialOperation' 400: description: Bad request. This could be due to missing or invalid data. @@ -1206,7 +1206,11 @@ def on_delete(self, req, rep, name, said): content: application/json+cesr: schema: - $ref: '#/components/schemas/Operation' + oneOf: + - $ref: '#/components/schemas/GroupOperation' + - $ref: '#/components/schemas/DelegationOperation' + - $ref: '#/components/schemas/WitnessOperation' + - $ref: '#/components/schemas/DoneOperation' 400: description: Bad request. This could be due to invalid revocation event or other invalid parameters. 404: diff --git a/src/keria/app/delegating.py b/src/keria/app/delegating.py index da0fcf66..84d51da9 100644 --- a/src/keria/app/delegating.py +++ b/src/keria/app/delegating.py @@ -5,7 +5,6 @@ from keri.app import forwarding, agenting, habbing from keri.core import coring, serdering from keri.db import dbing - from keria.core import httping, longrunning DELEGATION_ROUTE = "/identifiers/{name}/delegation" @@ -240,7 +239,7 @@ def on_post(self, req, rep, name): content: application/json: schema: - $ref: '#/components/schemas/Operation' + - $ref: '#/components/schemas/DelegatorOperation' 400: description: Bad request. This could be due to missing or invalid parameters. 404: diff --git a/src/keria/app/grouping.py b/src/keria/app/grouping.py index 2bb7cf4e..bea9413d 100644 --- a/src/keria/app/grouping.py +++ b/src/keria/app/grouping.py @@ -19,6 +19,7 @@ from keria.core import httping, longrunning from keria.app import aiding, credentialing, agenting +from keria.peer import exchanging logger = ogler.getLogger() @@ -188,7 +189,7 @@ def on_post(req, rep, name): application/json: schema: type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/GroupOperation' 400: description: Bad request. Bad request. This could be due to missing or invalid parameters. 404: @@ -314,7 +315,7 @@ class MultisigRpyEmbeds: @dataclass class MultisigExnEmbeds: - exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + exn: Union["exchanging.EXN_V_1", "exchanging.EXN_V_2"] # type: ignore @dataclass @@ -377,7 +378,7 @@ class ExnExnEmbeds(ExnEmbedsBase, MultisigExnEmbeds): @dataclass class ExnMultisig: - exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + exn: Union["exchanging.EXN_V_1", "exchanging.EXN_V_2"] # type: ignore paths: dict groupName: Optional[str] = field( default=None, metadata={"marshmallow_field": fields.String(allow_none=False)} diff --git a/src/keria/app/ipexing.py b/src/keria/app/ipexing.py index ca55d9bc..208bf0ba 100644 --- a/src/keria/app/ipexing.py +++ b/src/keria/app/ipexing.py @@ -50,8 +50,7 @@ def on_post(req, rep, name): content: application/json: schema: - type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ExchangeOperation' """ agent = req.context.agent @@ -223,7 +222,7 @@ def on_post(req, rep, name): application/json: schema: type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ExchangeOperation' """ agent = req.context.agent @@ -383,7 +382,7 @@ def on_post(req, rep, name): application/json: schema: type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ExchangeOperation' """ agent = req.context.agent @@ -537,7 +536,7 @@ def on_post(req, rep, name): application/json: schema: type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ExchangeOperation' """ agent = req.context.agent @@ -695,7 +694,7 @@ def on_post(req, rep, name): application/json: schema: type: object - $ref: '#/components/schemas/Operation' + $ref: '#/components/schemas/ExchangeOperation' """ agent = req.context.agent diff --git a/src/keria/app/specing.py b/src/keria/app/specing.py index 6d078e45..ec61b19a 100644 --- a/src/keria/app/specing.py +++ b/src/keria/app/specing.py @@ -7,7 +7,7 @@ from keria.app import aiding, agenting, grouping, notifying from keria.peer import exchanging -from ..core import longrunning +from ..core import optypes from ..utils.openapi import applyAltConstraintsToOpenApiSchema from . import credentialing from keri.core import coring @@ -104,22 +104,26 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): "VCP_V_1", schema=marshmallow_dataclass.class_schema(agenting.VCP_V_1)(), ) + self.spec.components.schema( + "ISS_V_1", + schema=marshmallow_dataclass.class_schema(agenting.ISS_V_1)(), + ) + self.spec.components.schema( + "REV_V_1", + schema=marshmallow_dataclass.class_schema(agenting.REV_V_1)(), + ) self.spec.components.schema( "EXN_V_1", - schema=marshmallow_dataclass.class_schema(agenting.EXN_V_1)(), + schema=marshmallow_dataclass.class_schema(exchanging.EXN_V_1)(), ) self.spec.components.schema( "EXN_V_2", - schema=marshmallow_dataclass.class_schema(agenting.EXN_V_2)(), + schema=marshmallow_dataclass.class_schema(exchanging.EXN_V_2)(), ) self.spec.components.schema( "Credential", schema=marshmallow_dataclass.class_schema(credentialing.ClonedCredential)(), ) - self.spec.components.schema( - "Operation", - schema=marshmallow_dataclass.class_schema(longrunning.Operation)(), - ) self.spec.components.schema( "CredentialStateIssOrRev", schema=marshmallow_dataclass.class_schema( @@ -185,11 +189,6 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): "$ref": "#/components/schemas/CredentialState" } - # Operation - operationSchema = self.spec.components.schemas["Operation"] - operationSchema["properties"]["metadata"] = {"type": "object"} - operationSchema["properties"]["response"] = {"type": "object"} - # Registries self.spec.components.schema( "Registry", @@ -290,13 +289,6 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): "EndRole", schema=marshmallow_dataclass.class_schema(aiding.EndRole)() ) - self.spec.components.schemas["Rpy"] = { - "oneOf": [ - {"$ref": "#/components/schemas/RPY_V_1"}, - {"$ref": "#/components/schemas/RPY_V_2"}, - ] - } - # Register the Challenge schema self.spec.components.schema( "Challenge", schema=marshmallow_dataclass.class_schema(aiding.Challenge)() @@ -515,6 +507,500 @@ def __init__(self, app, title, version="1.0.1", openapi_version="3.1.0"): if "nt" not in keyStateRecordSchema["required"]: keyStateRecordSchema["required"].append("nt") + # Register the OOBI operation schemas + self.spec.components.schema( + "PendingOOBIOperation", + schema=marshmallow_dataclass.class_schema(optypes.PendingOOBIOperation)(), + ) + self.spec.components.schema( + "CompletedOOBIOperation", + schema=marshmallow_dataclass.class_schema(optypes.CompletedOOBIOperation)(), + ) + self.spec.components.schema( + "FailedOOBIOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedOOBIOperation)(), + ) + self.spec.components.schemas["OOBIOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingOOBIOperation"}, + {"$ref": "#/components/schemas/CompletedOOBIOperation"}, + {"$ref": "#/components/schemas/FailedOOBIOperation"}, + ] + } + + # Register the Query operation schemas + self.spec.components.schema( + "PendingQueryOperation", + schema=marshmallow_dataclass.class_schema(optypes.PendingQueryOperation)(), + ) + self.spec.components.schema( + "CompletedQueryOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedQueryOperation + )(), + ) + self.spec.components.schema( + "FailedQueryOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedQueryOperation)(), + ) + self.spec.components.schemas["QueryOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingQueryOperation"}, + {"$ref": "#/components/schemas/CompletedQueryOperation"}, + {"$ref": "#/components/schemas/FailedQueryOperation"}, + ] + } + + # Register the EndRole operation schemas + self.spec.components.schema( + "PendingEndRoleOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingEndRoleOperation + )(), + ) + self.spec.components.schema( + "CompletedEndRoleOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedEndRoleOperation + )(), + ) + self.spec.components.schema( + "FailedEndRoleOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedEndRoleOperation)(), + ) + self.spec.components.schemas["CompletedEndRoleOperation"]["properties"][ + "response" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/RPY_V_1"}, + {"$ref": "#/components/schemas/RPY_V_2"}, + ] + } + self.spec.components.schemas["EndRoleOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingEndRoleOperation"}, + {"$ref": "#/components/schemas/CompletedEndRoleOperation"}, + {"$ref": "#/components/schemas/FailedEndRoleOperation"}, + ] + } + + # Register the Witness operation schemas + self.spec.components.schema( + "PendingWitnessOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingWitnessOperation + )(), + ) + self.spec.components.schema( + "CompletedWitnessOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedWitnessOperation + )(), + ) + self.spec.components.schema( + "FailedWitnessOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedWitnessOperation)(), + ) + self.spec.components.schemas["CompletedWitnessOperation"]["properties"][ + "response" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ICP_V_1"}, + {"$ref": "#/components/schemas/ICP_V_2"}, + {"$ref": "#/components/schemas/ROT_V_1"}, + {"$ref": "#/components/schemas/ROT_V_2"}, + {"$ref": "#/components/schemas/IXN_V_1"}, + {"$ref": "#/components/schemas/IXN_V_2"}, + ] + } + self.spec.components.schemas["WitnessOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingWitnessOperation"}, + {"$ref": "#/components/schemas/CompletedWitnessOperation"}, + {"$ref": "#/components/schemas/FailedWitnessOperation"}, + ] + } + + # Register the Delegation operation schemas + self.spec.components.schema( + "PendingDelegationOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingDelegationOperation + )(), + ) + self.spec.components.schema( + "CompletedDelegationOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedDelegationOperation + )(), + ) + self.spec.components.schema( + "FailedDelegationOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedDelegationOperation + )(), + ) + self.spec.components.schemas["CompletedDelegationOperation"]["properties"][ + "response" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/DIP_V_1"}, + {"$ref": "#/components/schemas/DIP_V_2"}, + {"$ref": "#/components/schemas/DRT_V_1"}, + {"$ref": "#/components/schemas/DRT_V_2"}, + ] + } + self.spec.components.schemas["DelegationOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingDelegationOperation"}, + {"$ref": "#/components/schemas/CompletedDelegationOperation"}, + {"$ref": "#/components/schemas/FailedDelegationOperation"}, + ] + } + + # Registry operation schemas + self.spec.components.schema( + "PendingRegistryOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingRegistryOperation + )(), + ) + self.spec.components.schema( + "CompletedRegistryOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedRegistryOperation + )(), + ) + self.spec.components.schema( + "FailedRegistryOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedRegistryOperation + )(), + ) + self.spec.components.schemas["RegistryOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingRegistryOperation"}, + {"$ref": "#/components/schemas/CompletedRegistryOperation"}, + {"$ref": "#/components/schemas/FailedRegistryOperation"}, + ] + } + + # LocScheme operation schemas + self.spec.components.schema( + "PendingLocSchemeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingLocSchemeOperation + )(), + ) + self.spec.components.schema( + "CompletedLocSchemeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedLocSchemeOperation + )(), + ) + self.spec.components.schema( + "FailedLocSchemeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedLocSchemeOperation + )(), + ) + self.spec.components.schemas["LocSchemeOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingLocSchemeOperation"}, + {"$ref": "#/components/schemas/CompletedLocSchemeOperation"}, + {"$ref": "#/components/schemas/FailedLocSchemeOperation"}, + ] + } + + # Challenge operation schemas + self.spec.components.schema( + "PendingChallengeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingChallengeOperation + )(), + ) + self.spec.components.schema( + "CompletedChallengeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedChallengeOperation + )(), + ) + self.spec.components.schema( + "FailedChallengeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedChallengeOperation + )(), + ) + self.spec.components.schemas["ChallengeOperationResponse"]["properties"][ + "exn" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/EXN_V_1"}, + {"$ref": "#/components/schemas/EXN_V_2"}, + ] + } + self.spec.components.schemas["ChallengeOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingChallengeOperation"}, + {"$ref": "#/components/schemas/CompletedChallengeOperation"}, + {"$ref": "#/components/schemas/FailedChallengeOperation"}, + ] + } + + # Exchange operation schemas + self.spec.components.schema( + "PendingExchangeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingExchangeOperation + )(), + ) + self.spec.components.schema( + "CompletedExchangeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedExchangeOperation + )(), + ) + self.spec.components.schema( + "FailedExchangeOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedExchangeOperation + )(), + ) + self.spec.components.schemas["ExchangeOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingExchangeOperation"}, + {"$ref": "#/components/schemas/CompletedExchangeOperation"}, + {"$ref": "#/components/schemas/FailedExchangeOperation"}, + ] + } + + # Submit operation schemas + self.spec.components.schema( + "PendingSubmitOperation", + schema=marshmallow_dataclass.class_schema(optypes.PendingSubmitOperation)(), + ) + self.spec.components.schema( + "CompletedSubmitOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedSubmitOperation + )(), + ) + self.spec.components.schema( + "FailedSubmitOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedSubmitOperation)(), + ) + self.spec.components.schemas["SubmitOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingSubmitOperation"}, + {"$ref": "#/components/schemas/CompletedSubmitOperation"}, + {"$ref": "#/components/schemas/FailedSubmitOperation"}, + ] + } + + # Done operation schemas + self.spec.components.schema( + "DoneOperationMetadata", + schema=marshmallow_dataclass.class_schema(optypes.DoneOperationMetadata)(), + ) + self.spec.components.schemas["DoneOperationMetadata"]["properties"][ + "response" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ICP_V_1"}, + {"$ref": "#/components/schemas/ICP_V_2"}, + {"$ref": "#/components/schemas/ROT_V_1"}, + {"$ref": "#/components/schemas/ROT_V_2"}, + {"$ref": "#/components/schemas/EXN_V_1"}, + {"$ref": "#/components/schemas/EXN_V_2"}, + ] + } + self.spec.components.schema( + "PendingDoneOperation", + schema=marshmallow_dataclass.class_schema(optypes.PendingDoneOperation)(), + ) + self.spec.components.schema( + "CompletedDoneOperation", + schema=marshmallow_dataclass.class_schema(optypes.CompletedDoneOperation)(), + ) + self.spec.components.schema( + "FailedDoneOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedDoneOperation)(), + ) + self.spec.components.schemas["CompletedDoneOperation"]["properties"][ + "response" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ICP_V_1"}, + {"$ref": "#/components/schemas/ICP_V_2"}, + {"$ref": "#/components/schemas/ROT_V_1"}, + {"$ref": "#/components/schemas/ROT_V_2"}, + {"$ref": "#/components/schemas/EXN_V_1"}, + {"$ref": "#/components/schemas/EXN_V_2"}, + ] + } + self.spec.components.schemas["DoneOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingDoneOperation"}, + {"$ref": "#/components/schemas/CompletedDoneOperation"}, + {"$ref": "#/components/schemas/FailedDoneOperation"}, + ] + } + + # Credential operation schemas + self.spec.components.schema( + "CredentialOperationMetadata", + schema=marshmallow_dataclass.class_schema( + optypes.CredentialOperationMetadata + )(), + ) + self.spec.components.schemas["CredentialOperationMetadata"]["properties"][ + "ced" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ACDC_V_1"}, + {"$ref": "#/components/schemas/ACDC_V_2"}, + ] + } + self.spec.components.schemas["CredentialOperationMetadata"]["properties"][ + "depends" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ROT_V_1"}, + {"$ref": "#/components/schemas/ROT_V_2"}, + {"$ref": "#/components/schemas/DRT_V_1"}, + {"$ref": "#/components/schemas/DRT_V_2"}, + {"$ref": "#/components/schemas/IXN_V_1"}, + {"$ref": "#/components/schemas/IXN_V_2"}, + ] + } + self.spec.components.schema( + "CredentialOperationResponse", + schema=marshmallow_dataclass.class_schema( + optypes.CredentialOperationResponse + )(), + ) + self.spec.components.schemas["CredentialOperationResponse"]["properties"][ + "ced" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/ACDC_V_1"}, + {"$ref": "#/components/schemas/ACDC_V_2"}, + ] + } + self.spec.components.schema( + "PendingCredentialOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingCredentialOperation + )(), + ) + self.spec.components.schema( + "CompletedCredentialOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedCredentialOperation + )(), + ) + self.spec.components.schema( + "FailedCredentialOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedCredentialOperation + )(), + ) + self.spec.components.schemas["CredentialOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingCredentialOperation"}, + {"$ref": "#/components/schemas/CompletedCredentialOperation"}, + {"$ref": "#/components/schemas/FailedCredentialOperation"}, + ] + } + + # Group operation schemas + self.spec.components.schema( + "PendingGroupOperation", + schema=marshmallow_dataclass.class_schema(optypes.PendingGroupOperation)(), + ) + self.spec.components.schema( + "CompletedGroupOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedGroupOperation + )(), + ) + self.spec.components.schema( + "FailedGroupOperation", + schema=marshmallow_dataclass.class_schema(optypes.FailedGroupOperation)(), + ) + self.spec.components.schemas["CompletedGroupOperation"]["properties"][ + "response" + ] = ancEvent + self.spec.components.schemas["GroupOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingGroupOperation"}, + {"$ref": "#/components/schemas/CompletedGroupOperation"}, + {"$ref": "#/components/schemas/FailedGroupOperation"}, + ] + } + + # Delegator operation schemas + self.spec.components.schema( + "DelegatorOperationMetadata", + schema=marshmallow_dataclass.class_schema( + optypes.DelegatorOperationMetadata + )(), + ) + self.spec.components.schemas["DelegatorOperationMetadata"]["properties"][ + "depends" + ] = { + "oneOf": [ + {"$ref": "#/components/schemas/GroupOperation"}, + {"$ref": "#/components/schemas/WitnessOperation"}, + {"$ref": "#/components/schemas/DoneOperation"}, + ] + } + + self.spec.components.schema( + "PendingDelegatorOperation", + schema=marshmallow_dataclass.class_schema( + optypes.PendingDelegatorOperation + )(), + ) + self.spec.components.schema( + "CompletedDelegatorOperation", + schema=marshmallow_dataclass.class_schema( + optypes.CompletedDelegatorOperation + )(), + ) + self.spec.components.schema( + "FailedDelegatorOperation", + schema=marshmallow_dataclass.class_schema( + optypes.FailedDelegatorOperation + )(), + ) + self.spec.components.schemas["DelegatorOperation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/PendingDelegatorOperation"}, + {"$ref": "#/components/schemas/CompletedDelegatorOperation"}, + {"$ref": "#/components/schemas/FailedDelegatorOperation"}, + ] + } + + self.spec.components.schemas["Operation"] = { + "oneOf": [ + {"$ref": "#/components/schemas/OOBIOperation"}, + {"$ref": "#/components/schemas/QueryOperation"}, + {"$ref": "#/components/schemas/EndRoleOperation"}, + {"$ref": "#/components/schemas/WitnessOperation"}, + {"$ref": "#/components/schemas/DelegationOperation"}, + {"$ref": "#/components/schemas/RegistryOperation"}, + {"$ref": "#/components/schemas/LocSchemeOperation"}, + {"$ref": "#/components/schemas/ChallengeOperation"}, + {"$ref": "#/components/schemas/ExchangeOperation"}, + {"$ref": "#/components/schemas/SubmitOperation"}, + {"$ref": "#/components/schemas/DoneOperation"}, + {"$ref": "#/components/schemas/CredentialOperation"}, + {"$ref": "#/components/schemas/GroupOperation"}, + {"$ref": "#/components/schemas/DelegatorOperation"}, + ] + } + self.addRoutes(app) def addRoutes(self, app): diff --git a/src/keria/core/longrunning.py b/src/keria/core/longrunning.py index 3b0913a3..c5dc8087 100644 --- a/src/keria/core/longrunning.py +++ b/src/keria/core/longrunning.py @@ -9,7 +9,7 @@ from collections import namedtuple from dataclasses import dataclass, asdict, field from marshmallow import fields -from typing import Optional, Dict +from typing import Literal, Optional, Dict, Union import falcon import json @@ -19,7 +19,6 @@ from keri.core import eventing, coring, serdering from keri.db import dbing, koming from keri.help import helping -from marshmallow_dataclass import class_schema from keria.app import delegating @@ -59,21 +58,32 @@ class OperationStatus: @dataclass_json @dataclass -class Operation: +class BaseOperation: name: str - error: Optional[OperationStatus] = field( - default=None, - metadata={ - "marshmallow_field": fields.Nested( - class_schema(OperationStatus), required=False - ) - }, - ) - done: bool = field( - default=False, metadata={"marshmallow_field": fields.Boolean(allow_none=False)} - ) - metadata: Optional[dict] = None - response: Optional[dict] = None + metadata: Optional[dict] + + +@dataclass_json +@dataclass +class PendingOperation(BaseOperation): + done: Literal[False] = False + + +@dataclass_json +@dataclass +class CompletedOperation(BaseOperation): + response: dict + done: Literal[True] = True + + +@dataclass_json +@dataclass +class FailedOperation(BaseOperation): + error: OperationStatus + done: Literal[True] = True + + +Operation = Union[PendingOperation, CompletedOperation, FailedOperation] @dataclass @@ -205,7 +215,7 @@ def get_status(op): except Exception as err: # self.status may throw an exception. # Handling error by returning an operation with error status - return Operation( + return FailedOperation( name=f"{op.type}.{op.oid}", metadata=op.metadata, done=True, @@ -233,10 +243,11 @@ def status(self, op): """ - operation = Operation( - name=f"{op.type}.{op.oid}", - metadata=op.metadata, - ) + done = False + response = None + error = None + name = f"{op.type}.{op.oid}" + metadata = op.metadata if op.type in (OpTypes.witness,): if "pre" not in op.metadata or "sn" not in op.metadata: @@ -264,8 +275,8 @@ def status(self, op): dbing.dgKey(pre=kever.prefixer.qb64, dig=bytes(sdig)) ) serder = serdering.SerderKERI(raw=bytes(evt)) - operation.done = True - operation.response = serder.ked + done = True + response = serder.ked else: start = helping.fromIso8601(op.start) @@ -273,17 +284,17 @@ def status(self, op): if (dtnow - start) > datetime.timedelta( seconds=eventing.Kevery.TimeoutPWE ): - operation.done = True - operation.error = OperationStatus( + done = True + error = OperationStatus( code=408, # Using HTTP error codes here for lack of a better alternative message=f"long running {op.type} for {op.oid} (pre: {pre}) operation timed out before " f"receiving sufficient witness receipts", ) else: - operation.done = False + done = False else: - operation.done = False + done = False elif op.type in (OpTypes.oobi,): if "oobi" not in op.metadata: @@ -294,22 +305,22 @@ def status(self, op): oobi = op.metadata["oobi"] obr = self.hby.db.roobi.get(keys=(oobi,)) if obr is None: - operation.done = False + done = False elif obr.state == Result.resolved: - operation.done = True + done = True if obr.cid and obr.cid in self.hby.kevers: kever = self.hby.kevers[obr.cid] - operation.response = asdict(kever.state()) + response = asdict(kever.state()) else: - operation.response = dict(oobi=oobi) + response = dict(oobi=oobi) elif obr.state == Result.failed: - operation.done = True - operation.failed = OperationStatus( + done = True + error = OperationStatus( code=500, message=f"resolving OOBI {op.oid} failed" ) else: - operation.done = False + done = False elif op.type in (OpTypes.delegation,): if "pre" not in op.metadata: @@ -340,10 +351,10 @@ def status(self, op): ) serder = serdering.SerderKERI(raw=bytes(evt)) - operation.done = True - operation.response = serder.ked + done = True + response = serder.ked else: - operation.done = False + done = False elif ( reqtee in op.metadata ): # delegator detects delegatee delegation success @@ -352,12 +363,12 @@ def status(self, op): if ( teepre in self.hby.kevers ): # delegatee dip has been processed by the delegator - operation.done = True - operation.response = op.metadata[reqtee] + done = True + response = op.metadata[reqtee] else: hab = self.hby.habByPre(kever.prefixer.qb64) delegating.approveDelegation(hab, anc) - operation.done = False + done = False else: raise falcon.HTTPBadRequest( description=f"longrunning operation type {op.type} requires one of {required}, but are missing from request" @@ -380,10 +391,10 @@ def status(self, op): ) serder = serdering.SerderKERI(raw=bytes(evt)) - operation.done = True - operation.response = serder.ked + done = True + response = serder.ked else: - operation.done = False + done = False elif op.type in (OpTypes.query,): if "pre" not in op.metadata: @@ -393,24 +404,24 @@ def status(self, op): pre = op.metadata["pre"] if pre not in self.hby.kevers: - operation.done = False + done = False else: kever = self.hby.kevers[pre] if "sn" in op.metadata: sn = int(op.metadata["sn"], 16) if kever.sn >= sn: - operation.done = True - operation.response = asdict(kever.state()) + done = True + response = asdict(kever.state()) else: - operation.done = False + done = False elif "anchor" in op.metadata: anchor = op.metadata["anchor"] if self.hby.db.findAnchoringSealEvent(pre, seal=anchor) is not None: - operation.done = True - operation.response = asdict(kever.state()) + done = True + response = asdict(kever.state()) else: - operation.done = False + done = False else: ksn = None for _, saider in self.hby.db.knas.getItemIter(keys=(pre,)): @@ -418,10 +429,10 @@ def status(self, op): break if ksn and ksn.d == kever.serder.said: - operation.done = True - operation.response = asdict(kever.state()) + done = True + response = asdict(kever.state()) else: - operation.done = False + done = False elif op.type in (OpTypes.registry,): if "pre" not in op.metadata or "anchor" not in op.metadata: @@ -437,10 +448,10 @@ def status(self, op): anchor = op.metadata["anchor"] if self.hby.db.findAnchoringSealEvent(pre, seal=anchor) is not None: - operation.done = True - operation.response = dict(anchor=anchor) + done = True + response = dict(anchor=anchor) else: - operation.done = False + done = False elif op.type in (OpTypes.credential,): if "ced" not in op.metadata: @@ -450,17 +461,17 @@ def status(self, op): ced = op.metadata["ced"] if self.credentialer.complete(ced["d"]): - operation.done = True - operation.response = dict(ced=ced) + done = True + response = dict(ced=ced) else: - operation.done = False + done = False elif op.type in (OpTypes.exchange,): if self.exchanger.complete(op.oid): - operation.done = True - operation.response = dict(said=op.oid) + done = True + response = dict(said=op.oid) else: - operation.done = False + done = False elif op.type in (OpTypes.endrole,): if ( @@ -480,10 +491,10 @@ def status(self, op): if end and (end.enabled or end.allowed): saider = self.hby.db.eans.get(keys=(cid, role, eid)) serder = self.hby.db.rpys.get(keys=(saider.qb64,)) - operation.done = True - operation.response = serder.ked + done = True + response = serder.ked else: - operation.done = False + done = False elif op.type in (OpTypes.locscheme,): if ( @@ -501,14 +512,14 @@ def status(self, op): loc = self.hby.db.locs.get(keys=(eid, scheme)) if loc: - operation.done = True - operation.response = dict(eid=eid, scheme=scheme, url=url) + done = True + response = dict(eid=eid, scheme=scheme, url=url) else: - operation.done = False + done = False elif op.type in (OpTypes.challenge,): if op.oid not in self.hby.kevers: - operation.done = False + done = False if "words" not in op.metadata: raise kering.ValidationError( @@ -525,10 +536,10 @@ def status(self, op): break if found: - operation.done = True - operation.response = dict(exn=exn.ked) + done = True + response = dict(exn=exn.ked) else: - operation.done = False + done = False elif op.type in (OpTypes.submit,): kever = self.hby.kevers[op.oid] @@ -537,35 +548,51 @@ def status(self, op): and len(self.submitter.submits) == 0 and len(self.submitter.doers) == 0 ): - operation.done = True - operation.response = asdict(kever.state()) + done = True + response = asdict(kever.state()) else: start = helping.fromIso8601(op.start) dtnow = helping.nowUTC() if (dtnow - start) > datetime.timedelta( seconds=eventing.Kevery.TimeoutPWE ): - operation.done = True - operation.error = OperationStatus( + done = True + error = OperationStatus( code=408, # Using HTTP error codes here for lack of a better alternative message=f"long running {op.type} for {op.oid} operation timed out before " f"receiving sufficient witness receipts", ) else: - operation.done = False + done = False elif op.type in (OpTypes.done,): - operation.done = True - operation.response = op.metadata["response"] + done = True + response = op.metadata["response"] else: - operation.done = True - operation.error = OperationStatus( + done = True + error = OperationStatus( code=404, # Using HTTP error codes here for lack of a better alternative message=f"long running operation type {op.type} unknown", ) - return operation + if error is not None: + return FailedOperation( + name=name, + metadata=metadata, + error=error, + ) + elif done: + return CompletedOperation( + name=name, + metadata=metadata, + response=response, + ) + else: + return PendingOperation( + name=name, + metadata=metadata, + ) class OperationCollectionEnd: diff --git a/src/keria/core/optypes.py b/src/keria/core/optypes.py new file mode 100644 index 00000000..e89ac299 --- /dev/null +++ b/src/keria/core/optypes.py @@ -0,0 +1,772 @@ +# -*- encoding: utf-8 -*- +""" +KERIA +keria.core.operation module + +""" + +from dataclasses import dataclass, field +from marshmallow import fields +from typing import Union +from marshmallow_dataclass import class_schema +from keria.app import aiding, credentialing +from keria.app.credentialing import ( + Anchor, + AnchoringEvent, + ACDC_V_1, + ACDC_V_2, + ICP_V_1, + ICP_V_2, + ROT_V_1, + ROT_V_2, + DIP_V_1, + DIP_V_2, + IXN_V_1, + IXN_V_2, + DRT_V_1, + DRT_V_2, +) +from keria.app.aiding import ( + KeyStateRecord, + RPY_V_1, + RPY_V_2, +) +from keria.peer.exchanging import EXN_V_1, EXN_V_2 +from keria.core.longrunning import ( + OperationStatus, + PendingOperation, + CompletedOperation, + FailedOperation, +) + + +@dataclass +class OOBIMetadata: + oobi: str + + +@dataclass +class BaseOOBIOperation: + metadata: OOBIMetadata = field( + default_factory=OOBIMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OOBIMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingOOBIOperation(BaseOOBIOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedOOBIOperation(BaseOOBIOperation, CompletedOperation): + response: aiding.KeyStateRecord = field( + default_factory=aiding.KeyStateRecord, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(aiding.KeyStateRecord), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedOOBIOperation(BaseOOBIOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +OOBIOperation = Union[PendingOOBIOperation, CompletedOOBIOperation, FailedOOBIOperation] + + +@dataclass +class QueryMetadata: + pre: str + sn: int + anchor: credentialing.Anchor = field( + default_factory=credentialing.Anchor, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(credentialing.Anchor), required=False + ) + }, + ) + + +@dataclass +class BaseQueryOperation: + metadata: QueryMetadata = field( + default_factory=QueryMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(QueryMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingQueryOperation(BaseQueryOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedQueryOperation(BaseQueryOperation, CompletedOperation): + response: aiding.KeyStateRecord = field( + default_factory=aiding.KeyStateRecord, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(aiding.KeyStateRecord), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedQueryOperation(BaseQueryOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +QueryOperation = Union[ + PendingQueryOperation, CompletedQueryOperation, FailedQueryOperation +] + + +@dataclass +class WitnessMetadata: + pre: str + sn: int + + +@dataclass +class BaseWitnessOperation: + metadata: WitnessMetadata = field( + default_factory=WitnessMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(WitnessMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingWitnessOperation(BaseWitnessOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedWitnessOperation(BaseWitnessOperation, CompletedOperation): + response: Union[ICP_V_1, ICP_V_2, ROT_V_1, ROT_V_2, IXN_V_1, IXN_V_2] = field( + default=None, metadata={"required": True} + ) # type: ignore + + +@dataclass(kw_only=True) +class FailedWitnessOperation(BaseWitnessOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +WitnessOperation = Union[ + PendingWitnessOperation, CompletedWitnessOperation, FailedWitnessOperation +] + + +@dataclass +class DelegationMetadata: + pre: str + sn: int + + +@dataclass +class BaseDelegationOperation: + metadata: DelegationMetadata = field( + default_factory=DelegationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(DelegationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingDelegationOperation(BaseDelegationOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedDelegationOperation(BaseDelegationOperation, CompletedOperation): + response: Union[DIP_V_1, DIP_V_2, DRT_V_1, DRT_V_2] = field( + default=None, metadata={"required": True} + ) # type: ignore + + +@dataclass(kw_only=True) +class FailedDelegationOperation(BaseDelegationOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +DelegationOperation = Union[ + PendingDelegationOperation, CompletedDelegationOperation, FailedDelegationOperation +] + + +@dataclass +class DoneOperationMetadata: + response: Union[ICP_V_1, ICP_V_2, ROT_V_1, ROT_V_2, EXN_V_1, EXN_V_2] # type: ignore + pre: str = None + + +@dataclass +class BaseDoneOperation: + metadata: DoneOperationMetadata = field( + default_factory=DoneOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(DoneOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingDoneOperation(BaseDoneOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedDoneOperation(BaseDoneOperation, CompletedOperation): + response: Union[ICP_V_1, ICP_V_2, ROT_V_1, ROT_V_2, EXN_V_1, EXN_V_2] = field( + default=None, metadata={"required": True} + ) # type: ignore + + +@dataclass(kw_only=True) +class FailedDoneOperation(BaseDoneOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +DoneOperation = Union[PendingDoneOperation, CompletedDoneOperation, FailedDoneOperation] + + +@dataclass +class GroupOperationMetadata: + pre: str + sn: int + + +@dataclass +class BaseGroupOperation: + metadata: GroupOperationMetadata = field( + default_factory=GroupOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(GroupOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingGroupOperation(BaseGroupOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedGroupOperation(BaseGroupOperation, CompletedOperation): + response: AnchoringEvent = field(default=None, metadata={"required": True}) # type: ignore + + +@dataclass(kw_only=True) +class FailedGroupOperation(BaseGroupOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +GroupOperation = Union[ + PendingGroupOperation, CompletedGroupOperation, FailedGroupOperation +] + + +@dataclass +class DelegatorOperationMetadata: + pre: str + teepre: str + anchor: credentialing.Anchor = field( + default_factory=credentialing.Anchor, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(credentialing.Anchor), required=False + ) + }, + ) + depends: Union["GroupOperation", "WitnessOperation", "DoneOperation"] = None # type: ignore + + +@dataclass +class BaseDelegatorOperation: + metadata: DelegatorOperationMetadata = field( + default_factory=DelegatorOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(DelegatorOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingDelegatorOperation(BaseDelegatorOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedDelegatorOperation(BaseDelegatorOperation, CompletedOperation): + response: str + + +@dataclass(kw_only=True) +class FailedDelegatorOperation(BaseDelegatorOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +DelegatorOperation = Union[ + PendingDelegatorOperation, CompletedDelegatorOperation, FailedDelegatorOperation +] + + +@dataclass +class SubmitOperationMetadata: + pre: str + sn: int + + +@dataclass +class BaseSubmitOperation: + metadata: SubmitOperationMetadata = field( + default_factory=SubmitOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(SubmitOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingSubmitOperation(BaseSubmitOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedSubmitOperation(BaseSubmitOperation, CompletedOperation): + response: KeyStateRecord = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(KeyStateRecord), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedSubmitOperation(BaseSubmitOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +SubmitOperation = Union[ + PendingSubmitOperation, CompletedSubmitOperation, FailedSubmitOperation +] + + +@dataclass +class EndRoleMetadata: + cid: str + role: str + eid: str + + +@dataclass +class BaseEndRoleOperation: + metadata: EndRoleMetadata = field( + default_factory=EndRoleMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(EndRoleMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingEndRoleOperation(BaseEndRoleOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedEndRoleOperation(BaseEndRoleOperation, CompletedOperation): + response: Union[RPY_V_1, RPY_V_2] = field(default=None, metadata={"required": True}) # type: ignore + + +@dataclass(kw_only=True) +class FailedEndRoleOperation(BaseEndRoleOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +EndRoleOperation = Union[ + PendingEndRoleOperation, CompletedEndRoleOperation, FailedEndRoleOperation +] + + +@dataclass +class LocSchemeMetadata: + eid: str + scheme: str + url: str + + +@dataclass +class BaseLocSchemeOperation: + metadata: LocSchemeMetadata = field( + default_factory=LocSchemeMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(LocSchemeMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingLocSchemeOperation(BaseLocSchemeOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedLocSchemeOperation(BaseLocSchemeOperation, CompletedOperation): + response: LocSchemeMetadata = field( + default_factory=LocSchemeMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(LocSchemeMetadata), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedLocSchemeOperation(BaseLocSchemeOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +LocSchemeOperation = Union[ + PendingLocSchemeOperation, CompletedLocSchemeOperation, FailedLocSchemeOperation +] + + +@dataclass +class ChallengeOperationMetadata: + words: list[str] + + +@dataclass +class ChallengeOperationResponse: + exn: Union[EXN_V_1, EXN_V_2] # type: ignore + + +@dataclass +class BaseChallengeOperation: + metadata: ChallengeOperationMetadata = field( + default_factory=ChallengeOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(ChallengeOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingChallengeOperation(BaseChallengeOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedChallengeOperation(BaseChallengeOperation, CompletedOperation): + response: ChallengeOperationResponse = field( + default_factory=ChallengeOperationResponse, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(ChallengeOperationResponse), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedChallengeOperation(BaseChallengeOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +ChallengeOperation = Union[ + PendingChallengeOperation, CompletedChallengeOperation, FailedChallengeOperation +] + + +@dataclass +class RegistryOperationMetadata: + pre: str + depends: Union[ + "GroupOperation", "WitnessOperation", "DoneOperation", "DelegationOperation" + ] + anchor: Anchor = field( + default_factory=Anchor, + metadata={ + "marshmallow_field": fields.Nested(class_schema(Anchor), required=True) + }, + ) + + +@dataclass +class RegistryOperationResponse: + anchor: Anchor = field( + default_factory=Anchor, + metadata={ + "marshmallow_field": fields.Nested(class_schema(Anchor), required=True) + }, + ) + + +@dataclass +class BaseRegistryOperation: + metadata: RegistryOperationMetadata = field( + default_factory=RegistryOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(RegistryOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingRegistryOperation(BaseRegistryOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedRegistryOperation(BaseRegistryOperation, CompletedOperation): + response: RegistryOperationResponse = field( + default_factory=RegistryOperationResponse, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(RegistryOperationResponse), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedRegistryOperation(BaseRegistryOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +RegistryOperation = Union[ + PendingRegistryOperation, CompletedRegistryOperation, FailedRegistryOperation +] + + +@dataclass +class CredentialOperationMetadata: + ced: Union[ACDC_V_1, ACDC_V_2] # type: ignore + depends: Union[ROT_V_1, ROT_V_2, DRT_V_1, DRT_V_2, IXN_V_1, IXN_V_2] = None # type: ignore + + +@dataclass +class CredentialOperationResponse: + ced: Union[ACDC_V_1, ACDC_V_2] = None # type: ignore + + +@dataclass +class BaseCredentialOperation: + metadata: CredentialOperationMetadata = field( + default_factory=CredentialOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(CredentialOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingCredentialOperation(BaseCredentialOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedCredentialOperation(BaseCredentialOperation, CompletedOperation): + response: CredentialOperationResponse = field( + default_factory=CredentialOperationResponse, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(CredentialOperationResponse), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedCredentialOperation(BaseCredentialOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +CredentialOperation = Union[ + PendingCredentialOperation, CompletedCredentialOperation, FailedCredentialOperation +] + + +@dataclass +class ExchangeOperationMetadata: + said: str + + +@dataclass +class BaseExchangeOperation: + metadata: ExchangeOperationMetadata = field( + default_factory=ExchangeOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(ExchangeOperationMetadata), required=False + ) + }, + ) + + +@dataclass +class PendingExchangeOperation(BaseExchangeOperation, PendingOperation): + pass + + +@dataclass(kw_only=True) +class CompletedExchangeOperation(BaseExchangeOperation, CompletedOperation): + response: ExchangeOperationMetadata = field( + default_factory=ExchangeOperationMetadata, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(ExchangeOperationMetadata), required=True + ) + }, + ) + + +@dataclass(kw_only=True) +class FailedExchangeOperation(BaseExchangeOperation, FailedOperation): + error: OperationStatus = field( + default=None, + metadata={ + "marshmallow_field": fields.Nested( + class_schema(OperationStatus), required=True + ) + }, + ) + + +ExchangeOperation = Union[ + PendingExchangeOperation, CompletedExchangeOperation, FailedExchangeOperation +] diff --git a/src/keria/peer/exchanging.py b/src/keria/peer/exchanging.py index de8b528d..a68eae74 100644 --- a/src/keria/peer/exchanging.py +++ b/src/keria/peer/exchanging.py @@ -15,7 +15,7 @@ from keri.peer import exchanging from keri.help import ogler from keria.core import httping -from keria.app import agenting +from keria.utils.openapi import dataclassFromFielddom logger = ogler.getLogger() @@ -31,6 +31,17 @@ def loadEnds(app): app.add_route("/exchanges/{said}", exnResEnd) +exnFieldDomV1 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_1_0 +][serdering.Ilks.exn] +EXN_V_1, EXNSchema_V_1 = dataclassFromFielddom("EXN_V_1", exnFieldDomV1) + +exnFieldDomV2 = serdering.SerderKERI.Fields[serdering.Protocols.keri][ + serdering.Vrsn_2_0 +][serdering.Ilks.exn] +EXN_V_2, EXNSchema_V_2 = dataclassFromFielddom("EXN_V_2", exnFieldDomV2) + + class ExchangeCollectionEnd: @staticmethod def on_post(req, rep, name): @@ -158,7 +169,7 @@ def on_post(req, rep, name): class ExchangeResource: """Data class for exchange message resource""" - exn: Union["agenting.EXN_V_1", "agenting.EXN_V_2"] # type: ignore + exn: Union["EXN_V_1", "EXN_V_2"] # type: ignore pathed: dict def to_dict(self): diff --git a/tests/app/test_agenting.py b/tests/app/test_agenting.py index 29cbd4a6..cc85e1c4 100644 --- a/tests/app/test_agenting.py +++ b/tests/app/test_agenting.py @@ -894,10 +894,8 @@ def test_query_ends(helpers): assert result.status == falcon.HTTP_202 assert result.json == { "done": False, - "error": None, "metadata": {"pre": "EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9"}, "name": "query.EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9", - "response": None, } assert len(agent.queries) == 1 @@ -906,13 +904,11 @@ def test_query_ends(helpers): assert result.status == falcon.HTTP_202 assert result.json == { "done": False, - "error": None, "metadata": { "pre": "EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9", "sn": "2", }, "name": "query.EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9.2", - "response": None, } assert len(agent.queries) == 2 @@ -928,7 +924,6 @@ def test_query_ends(helpers): assert result.status == falcon.HTTP_202 assert result.json == { "done": False, - "error": None, "metadata": { "pre": "EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9", "anchor": { @@ -938,7 +933,6 @@ def test_query_ends(helpers): }, }, "name": "query.EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9.EHgwVwQT15OJvilVvW57HE4w0-GPs_Stj2OFoAHZSysY", - "response": None, } assert len(agent.queries) == 3 @@ -1148,8 +1142,6 @@ def test_submitter(seeder, helpers): assert resSubmit.text == json.dumps( dict( name="submit.EKOrePIIU8ynKwOOLxs56ZxxQswUFNV8-cyYFt3nBJHR", - error=None, - done=True, metadata={"alias": "pal", "sn": 0}, response={ "vn": [1, 0], @@ -1178,6 +1170,7 @@ def test_submitter(seeder, helpers): }, "di": "", }, + done=True, ) ) diff --git a/tests/app/test_grouping.py b/tests/app/test_grouping.py index 424cabb8..a2bd1823 100644 --- a/tests/app/test_grouping.py +++ b/tests/app/test_grouping.py @@ -290,13 +290,11 @@ def make(self, serder, sigers): assert res.status_code == 202 assert res.json == { "done": False, - "error": None, "metadata": { "pre": "EDWg3-rB5FTpcckaYdBcexGmbLIO6AvAwjaJTBlXUn_I", "sn": 3, }, "name": "group.EPKCBT0rSgFKTDRjynYzOTsYWo7fDNElTxFbRZZW9f6R", - "response": None, } res = client.simulate_post("/identifiers/mms/multisig/join", json=body) diff --git a/tests/app/test_ipexing.py b/tests/app/test_ipexing.py index ff853990..c4867234 100644 --- a/tests/app/test_ipexing.py +++ b/tests/app/test_ipexing.py @@ -367,10 +367,8 @@ def test_ipex_grant(helpers, mockHelpingNowIso8601, seeder): assert res.status_code == 200 assert res.json == { "done": False, - "error": None, "metadata": {"said": "ELkQART3yXFd8C6ImzGyqlDrgVUDtCfh1Goqr1PCbi9r"}, "name": "exchange.ELkQART3yXFd8C6ImzGyqlDrgVUDtCfh1Goqr1PCbi9r", - "response": None, } assert len(agent.exchanges) == 1 assert len(agent.grants) == 1 @@ -1766,10 +1764,8 @@ def test_ipex_apply(helpers, mockHelpingNowIso8601): res = client.simulate_post(path="/identifiers/test/ipex/apply", body=data) assert res.json == { "done": False, - "error": None, "metadata": {"said": "EPAThHL_ExMdhQoLTxsMWdsDo-aunDFZPkK_UKlCVe2d"}, "name": "exchange.EPAThHL_ExMdhQoLTxsMWdsDo-aunDFZPkK_UKlCVe2d", - "response": None, } assert res.status_code == 200 @@ -1905,10 +1901,8 @@ def test_ipex_offer(helpers, mockHelpingNowIso8601): res = client.simulate_post(path="/identifiers/test/ipex/offer", body=data) assert res.json == { "done": False, - "error": None, "metadata": {"said": "ECa9XU2648ryO8PXKEcWkS7V-hvpj86Nh3rjGv93g6jT"}, "name": "exchange.ECa9XU2648ryO8PXKEcWkS7V-hvpj86Nh3rjGv93g6jT", - "response": None, } assert res.status_code == 200 @@ -1967,10 +1961,8 @@ def test_ipex_offer(helpers, mockHelpingNowIso8601): res = client.simulate_post(path="/identifiers/test/ipex/offer", body=data) assert res.json == { "done": False, - "error": None, "metadata": {"said": "EM79tlKrG142-jcaglGnIXKRfLW_DKOK5pnTwN60yz5U"}, "name": "exchange.EM79tlKrG142-jcaglGnIXKRfLW_DKOK5pnTwN60yz5U", - "response": None, } assert res.status_code == 200 @@ -2085,10 +2077,8 @@ def test_ipex_agree(helpers, mockHelpingNowIso8601): res = client.simulate_post(path="/identifiers/test/ipex/agree", body=data) assert res.json == { "done": False, - "error": None, "metadata": {"said": "ENMBCgTGXxiMuTMcfGWp4uqnsiso1Jm3tAAn1x7ZPRox"}, "name": "exchange.ENMBCgTGXxiMuTMcfGWp4uqnsiso1Jm3tAAn1x7ZPRox", - "response": None, } assert res.status_code == 200 diff --git a/tests/app/test_specing.py b/tests/app/test_specing.py index 35ef62c1..a7e7a4ab 100644 --- a/tests/app/test_specing.py +++ b/tests/app/test_specing.py @@ -55,5 +55,5 @@ def test_spec_resource(helpers): # Assert on the entire JSON to ensure we are getting all the docs assert ( js - == '{"paths": {"/operations": {"get": {"summary": "Get list of long running operations", "parameters": [{"in": "query", "name": "type", "schema": {"type": "string"}, "required": false, "description": "filter list of long running operations by type"}], "responses": {"200": {"description": "list of long running operations", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Operation"}}}}}}}}, "/oobis": {"post": {"summary": "Resolve OOBI and assign an alias for the remote identifier", "description": "Resolve OOBI URL or `rpy` message by process results of request and assign \'alias\' in contact data for resolved identifier", "tags": ["OOBIs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "OOBI", "oneOf": [{"type": "object", "properties": {"oobialias": {"type": "string", "description": "alias to assign to the identifier resolved from this OOBI"}, "url": {"type": "string", "description": "URL OOBI"}, "rpy": {"type": "object", "description": "unsigned KERI `rpy` event message with endpoints"}}}]}}}}, "responses": {"202": {"description": "OOBI resolution to key state successful", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}}, "/states": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "description": "qb64 identifier prefix of KEL to load", "schema": {"type": "string"}, "required": true}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyStateRecord"}}}}}, "400": {"description": "Bad request, missing required fields"}, "404": {"description": "Identifier not found in Key event database"}}}}, "/events": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of KEL to load"}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyEventRecord"}}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/queries": {"post": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Query"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["pre"], "properties": {"pre": {"type": "string", "description": "qb64 identifier prefix of KEL to load"}, "anchor": {"type": "string", "description": "Anchor"}, "sn": {"type": "string", "description": "Serial number"}}}}}}, "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/config": {"get": {"summary": "Retrieve agent configuration", "description": "Retrieve agent configuration (only necessary fields are exposed)", "tags": ["Config"], "responses": {"200": {"description": "Subset of configuration dict as JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentConfig"}}}}}}}, "/identifiers": {"get": {"summary": "Retrieve a list of identifiers associated with the agent.", "description": "This endpoint retrieves a list of identifiers associated with the agent. It supports pagination through the \'Range\' header.", "tags": ["Identifier"], "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "The \'Range\' header is used for pagination. The default range is 0-9."}], "responses": {"200": {"description": "Successfully retrieved identifiers.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/HabStateBase"}}}}}, "206": {"description": "Successfully retrieved identifiers within the specified range."}}}, "options": {}, "post": {"summary": "Create an identifier.", "description": "This endpoint creates an identifier with the provided inception event, name, and signatures.", "tags": ["Identifier"], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"icp": {"type": "object", "description": "The inception event for the identifier."}, "name": {"type": "string", "description": "The name of the identifier."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures for the inception event."}, "group": {"type": "object", "description": "Multisig group information."}, "salty": {"type": "object", "description": "Salty parameters."}, "randy": {"type": "object", "description": "Randomly generated materials."}, "extern": {"type": "object", "description": "External parameters."}}}}}}, "responses": {"202": {"description": "Identifier creation is in progress. The response is a long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges": {"get": {"summary": "Get random list of words for a 2 factor auth challenge", "description": "Get the list of identifiers associated with this agent", "tags": ["Challenge/Response"], "parameters": [{"in": "query", "name": "strength", "schema": {"type": "integer"}, "description": "cryptographic strength of word list", "required": false}], "responses": {"200": {"description": "An array of random words", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Challenge"}}}}}}}, "/contacts": {"get": {"summary": "Get list of contact information associated with remote identifiers", "description": "Get list of contact information associated with remote identifiers. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "query", "name": "group", "schema": {"type": "string"}, "required": false, "description": "field name to group results by"}, {"in": "query", "name": "filter_field", "schema": {"type": "string"}, "description": "field name to search", "required": false}, {"in": "query", "name": "filter_value", "schema": {"type": "string"}, "description": "value to search for", "required": false}], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Contact"}}}}}}}}, "/oobi": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/": {"post": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"204": {"description": "KEL EXN, QRY, RPY event accepted."}}}, "put": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"200": {"description": "Mailbox query response for server sent events"}, "204": {"description": "KEL or EXN event accepted."}}}}, "/notifications": {"get": {"summary": "Get list of notifications for the controller of the agent", "description": "Get list of notifications for the controller of the agent. Notifications will be sorted by creation date/time", "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "size of the result list. Defaults to 25"}], "tags": ["Notifications"], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Notification"}}}}}}}}, "/operations/{name}": {"delete": {"summary": "Remove a specific long running operation.", "description": "This endpoint removes a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to remove."}], "responses": {"204": {"description": "Successfully removed the long running operation."}, "404": {"description": "The requested long running operation was not found."}, "500": {"description": "Internal server error. This could be due to an issue with removing the operation."}}}, "get": {"summary": "Retrieve a specific long running operation.", "description": "This endpoint retrieves the status of a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to retrieve."}], "responses": {"200": {"description": "Successfully retrieved the status of the long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "The requested long running operation was not found."}}}}, "/oobis/{alias}": {"get": {"summary": "Get OOBI for specific identifier", "description": "Generate OOBI for the identifier of the specified alias and role", "tags": ["OOBIs"], "parameters": [{"in": "path", "name": "alias", "schema": {"type": "string"}, "required": true, "description": "human readable alias for the identifier generate OOBI for"}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "role for which to generate OOBI"}], "responses": {"200": {"description": "An array of Identifier key state information", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}}}}, "/agent/{caid}": {"get": {"summary": "Retrieve key state record of an agent by controller AID.", "description": "This endpoint retrieves the key state record for a given controller of an agent.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "responses": {"200": {"description": "Successfully retrieved the key state record.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentResourceResult"}}}}, "400": {"description": "Bad request. This could be due to an invalid agent or controller configuration."}, "404": {"description": "The requested controller or agent was not found."}}}, "put": {"summary": "Update agent configuration by controller AID.", "description": "This endpoint updates the agent configuration based on the provided request parameters and body.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["rot", "sigs", "sxlt", "kyes"], "properties": {"rot": {"type": "object", "description": "The rotation event."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}, "sxlt": {"type": "string", "description": "The salty parameters."}, "keys": {"type": "object", "description": "The keys."}}}}}}, "responses": {"204": {"description": "Successfully updated the agent configuration."}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested agent was not found."}, "500": {"description": "Internal server error. This could be due to an issue with updating the agent configuration."}}}}, "/identifiers/{name}": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/endroles/{aid}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/escrows/rpy": {"get": {"summary": "Retrieve reply escrows.", "description": "This endpoint retrieves the reply escrows and can filter the collection based on a specific route.", "tags": ["Reply Escrow"], "parameters": [{"in": "query", "name": "route", "schema": {"type": "string"}, "required": false, "description": "The specific route to filter the reply escrow collection."}], "responses": {"200": {"description": "Successfully retrieved the reply escrows.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Rpy"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges/{name}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "Human readable alias or prefix for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/challenges_verify/{source}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}}}, "put": {"summary": "Mark challenge response exn message as signed", "description": "Mark challenge response exn message as signed", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"aid": {"type": "string", "description": "aid of signer of accepted challenge response"}, "said": {"type": "array", "description": "SAID of challenge message signed", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/contacts/{prefix}": {"delete": {"summary": "Delete contact information associated with remote identifier", "description": "Delete contact information associated with remote identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to delete"}], "responses": {"202": {"description": "Contact information successfully deleted for prefix"}, "404": {"description": "No contact information found for prefix"}}}, "get": {"summary": "Get contact information associated with single remote identifier", "description": "Get contact information associated with single remote identifier. All information is meta-data and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Create new contact information for an identifier", "description": "Creates new information for an identifier, overwriting all existing information for that identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}, "put": {"summary": "Update provided fields in contact information associated with remote identifier prefix", "description": "Update provided fields in contact information associated with remote identifier prefix. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}}, "/oobi/{aid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/notifications/{said}": {"delete": {"summary": "Delete notification", "description": "Delete notification", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to delete"}], "responses": {"202": {"description": "Notification successfully deleted for prefix"}, "404": {"description": "No notification information found for prefix"}}}, "put": {"summary": "Mark notification as read", "description": "Mark notification as read", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to mark as read"}], "responses": {"202": {"description": "Notification successfully marked as read for prefix"}, "404": {"description": "No notification information found for SAID"}}}}, "/identifiers/{name}/events": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/submit": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/oobis": {"get": {"summary": "Fetch OOBI URLs of an identifier.", "description": "This endpoint fetches the OOBI URLs for a specific role associated with an identifier.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The role for which to fetch the OOBI URLs. Can be a witness, controller, agent, or mailbox."}], "responses": {"200": {"description": "Successfully fetched the OOBI URLs. The response body contains the OOBI URLs.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/endroles": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/locschemes": {"post": {"summary": "Authorises a new location scheme.", "description": "This endpoint authorises a new location scheme (endpoint) for a particular endpoint identifier.", "tags": ["Loc Scheme"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The loc scheme authorisation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/members": {"get": {"summary": "Fetch group member information.", "description": "This endpoint retrieves the signing and rotation members for a specific group associated with an identifier.", "tags": ["Group Member"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully fetched the group member information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupMember"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/delegation": {"post": {}}, "/endroles/{aid}/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/contacts/{prefix}/img": {"get": {"summary": "Get contact image for identifer prefix", "description": "Get contact image for identifer prefix", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact image to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"image/jpg": {"schema": {"description": "Image", "type": "binary"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Uploads an image to associate with identifier.", "description": "Uploads an image to associate with identifier.", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "description": "identifier prefix to associate image to", "required": true}], "requestBody": {"required": true, "content": {"image/jpg": {"schema": {"type": "string", "format": "binary"}}, "image/png": {"schema": {"type": "string", "format": "binary"}}}}, "responses": {"200": {"description": "Image successfully uploaded"}}}}, "/oobi/{aid}/{role}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/oobi/{aid}/{role}/{eid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}/{eid}": {"delete": {}}}, "info": {"title": "KERIA Interactive Web Interface API", "version": "1.0.1"}, "openapi": "3.1.0", "components": {"schemas": {"ACDCAttributes": {"type": "object", "properties": {"dt": {"type": "string"}, "i": {"type": "string"}, "u": {"type": "string"}}, "additionalProperties": true}, "ACDC_V_1": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "ACDC_V_2": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "IssEvent": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"enum": ["iss", "bis"]}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "Schema": {"type": "object", "properties": {"$id": {"type": "string"}, "$schema": {"type": "string"}, "title": {"type": "string"}, "description": {"type": "string"}, "type": {"type": "string"}, "credentialType": {"type": "string"}, "version": {"type": "string"}, "properties": {"type": "object", "additionalProperties": {}}, "additionalProperties": {"type": "boolean"}, "required": {"type": "array", "items": {"type": "string"}}}, "required": ["$id", "$schema", "additionalProperties", "credentialType", "description", "properties", "required", "title", "type", "version"]}, "Anchor": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}, "d": {"type": "string"}}, "required": ["d", "pre", "sn"]}, "Seal": {"type": "object", "properties": {"s": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}}, "required": ["d", "s"]}, "IXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "IXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "ICP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ICP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ROT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "ROT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DIP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DIP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DRT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DRT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "RPY_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "r", "t", "v"]}, "RPY_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "i", "r", "t", "v"]}, "VCP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "ii": {"type": "string"}, "s": {"type": "string"}, "c": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "n": {"type": "string"}}, "required": ["b", "bt", "c", "d", "i", "ii", "n", "s", "t", "v"]}, "EXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "rp": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}, "e": {"type": "object", "additionalProperties": {}}}, "required": ["a", "d", "dt", "e", "i", "p", "q", "r", "rp", "t", "v"]}, "EXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "x": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}}, "required": ["a", "d", "dt", "i", "p", "q", "r", "t", "v", "x"]}, "Credential": {"type": "object", "properties": {"sad": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "atc": {"type": "string"}, "iss": {"$ref": "#/components/schemas/IssEvent"}, "issatc": {"type": "string"}, "pre": {"type": "string"}, "schema": {"$ref": "#/components/schemas/Schema"}, "chains": {"type": "array", "items": {"type": "object", "additionalProperties": {}}}, "status": {"$ref": "#/components/schemas/CredentialState"}, "anchor": {"$ref": "#/components/schemas/Anchor"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "ancatc": {"type": "string"}}, "required": ["anc", "ancatc", "anchor", "atc", "chains", "iss", "issatc", "pre", "sad", "schema", "status"]}, "OperationStatus": {"type": "object", "properties": {"code": {"type": "integer"}, "message": {"type": "string"}, "details": {"type": ["object", "null"], "additionalProperties": {}}}, "required": ["code", "message"]}, "Operation": {"type": "object", "properties": {"name": {"type": "string"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"type": "boolean"}, "metadata": {"type": "object"}, "response": {"type": "object"}}, "required": ["name"]}, "EmptyDict": {"type": "object", "properties": {}}, "CredentialStateIssOrRev": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["iss", "rev"]}, "ra": {"$ref": "#/components/schemas/EmptyDict"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "RaFields": {"type": "object", "properties": {"i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}}, "required": ["d", "i", "s"]}, "CredentialStateBisOrBrv": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["bis", "brv"]}, "ra": {"$ref": "#/components/schemas/RaFields"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "CredentialState": {"oneOf": [{"$ref": "#/components/schemas/CredentialStateIssOrRev"}, {"$ref": "#/components/schemas/CredentialStateBisOrBrv"}]}, "Registry": {"type": "object", "properties": {"name": {"type": "string"}, "regk": {"type": "string"}, "pre": {"type": "string"}, "state": {"$ref": "#/components/schemas/CredentialState"}}, "required": ["name", "pre", "regk", "state"]}, "StateEERecord": {"type": "object", "properties": {"s": {"type": "string", "default": "0"}, "d": {"type": "string", "default": ""}, "br": {"type": "array", "items": {}}, "ba": {"type": "array", "items": {}}}}, "KeyStateRecord": {"type": "object", "properties": {"vn": {"type": "array", "items": {"type": "integer"}}, "i": {"type": "string", "default": ""}, "s": {"type": "string", "default": "0"}, "p": {"type": "string", "default": ""}, "d": {"type": "string", "default": ""}, "f": {"type": "string", "default": "0"}, "dt": {"type": "string", "default": ""}, "et": {"type": "string", "default": ""}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string", "default": "0"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "ee": {"$ref": "#/components/schemas/StateEERecord"}, "di": {"type": "string", "default": ""}}, "required": ["b", "c", "ee", "k", "n", "kt", "nt"]}, "Controller": {"type": "object", "properties": {"state": {"$ref": "#/components/schemas/KeyStateRecord"}, "ee": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["ee", "state"]}, "AgentResourceResult": {"type": "object", "properties": {"agent": {"$ref": "#/components/schemas/KeyStateRecord"}, "controller": {"$ref": "#/components/schemas/Controller"}, "pidx": {"type": "integer"}, "ridx": {"type": ["integer", "null"], "default": null}, "sxlt": {"type": ["string", "null"], "default": null}}, "required": ["agent", "controller", "pidx"]}, "HabState": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": "boolean"}, "windexes": {"type": "array", "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "SaltyState": {"type": "object", "properties": {"tier": {"$ref": "#/components/schemas/Tier"}, "sxlt": {"type": "string", "default": ""}, "pidx": {"type": "integer", "default": 0}, "kidx": {"type": "integer", "default": 0}, "stem": {"type": "string", "default": ""}, "dcode": {"type": "string", "default": ""}, "icodes": {"type": "array", "items": {"type": "string"}}, "ncodes": {"type": "array", "items": {"type": "string"}}, "transferable": {"type": "boolean", "default": false}}, "required": ["icodes", "ncodes", "tier"]}, "RandyKeyState": {"type": "object", "properties": {"prxs": {"type": "array", "items": {"type": "string"}}, "nxts": {"type": "array", "items": {"type": "string"}}}, "required": ["nxts", "prxs"]}, "GroupKeyState": {"type": "object", "properties": {"mhab": {"$ref": "#/components/schemas/HabState"}, "keys": {"type": "array", "items": {"type": "string"}}, "ndigs": {"type": "array", "items": {"type": "string"}}}, "required": ["keys", "mhab", "ndigs"]}, "ExternState": {"type": "object", "properties": {"extern_type": {"type": "string"}, "pidx": {"type": "integer"}}, "required": ["extern_type", "pidx"], "additionalProperties": true}, "HabStateBase": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}}, "required": ["icp_dt", "name", "prefix"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "Tier": {"type": "string", "enum": ["low", "med", "high"], "description": "Tier of key material"}, "OOBI": {"type": "object", "properties": {"role": {"type": "string", "enum": ["controller", "witness", "registrar", "watcher", "judge", "juror", "peer", "mailbox", "agent"]}, "oobis": {"type": "array", "items": {"type": "string"}}}, "required": ["oobis", "role"]}, "EndRole": {"type": "object", "properties": {"cid": {"type": "string"}, "role": {"type": "string"}, "eid": {"type": "string"}}, "required": ["cid", "eid", "role"]}, "Rpy": {"oneOf": [{"$ref": "#/components/schemas/RPY_V_1"}, {"$ref": "#/components/schemas/RPY_V_2"}]}, "Challenge": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "string"}}, "dt": {"type": "string"}, "said": {"type": "string"}, "authenticated": {"type": "boolean"}}, "required": ["words"]}, "MemberEnds": {"type": "object", "properties": {"agent": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "controller": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "witness": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "registrar": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "watcher": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "judge": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "juror": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "peer": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "mailbox": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}}}, "WellKnown": {"type": "object", "properties": {"url": {"type": "string"}, "dt": {"type": "string"}}, "required": ["dt", "url"]}, "Contact": {"type": "object", "properties": {"id": {"type": "string"}, "alias": {"type": "string"}, "oobi": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}, "challenges": {"type": "array", "items": {"$ref": "#/components/schemas/Challenge"}}, "wellKnowns": {"type": "array", "items": {"$ref": "#/components/schemas/WellKnown"}}}, "required": ["id"], "additionalProperties": true}, "AidRecord": {"type": "object", "properties": {"aid": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}}, "required": ["aid", "ends"]}, "GroupMember": {"type": "object", "properties": {"signing": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}, "rotation": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}}, "required": ["rotation", "signing"]}, "KeyEventRecord": {"type": "object", "properties": {"ked": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "atc": {"type": "string"}}, "required": ["atc", "ked"]}, "AgentConfig": {"type": "object", "properties": {"iurls": {"type": "array", "items": {"type": "string"}}}}, "Exn": {"oneOf": [{"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}, "Icp": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}]}, "Rot": {"oneOf": [{"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}]}, "Vcp": {"oneOf": [{"$ref": "#/components/schemas/VCP_V_1"}]}, "Iss": {"oneOf": [{"$ref": "#/components/schemas/ISS_V_1"}]}, "Ixn": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}]}, "NotificationData": {"type": "object", "properties": {"r": {"type": "string"}, "d": {"type": "string"}, "m": {"type": "string"}}, "additionalProperties": true}, "Notification": {"type": "object", "properties": {"i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "boolean"}, "a": {"$ref": "#/components/schemas/NotificationData"}}, "required": ["a", "dt", "i", "r"]}, "ExchangeResource": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "pathed": {"type": "object", "additionalProperties": {}}}, "required": ["exn", "pathed"]}, "MultisigInceptEmbeds": {"type": "object", "properties": {"icp": {"$ref": "#/components/schemas/Icp"}}, "required": ["icp"]}, "MultisigRotateEmbeds": {"type": "object", "properties": {"rot": {"$ref": "#/components/schemas/Rot"}}, "required": ["rot"]}, "MultisigInteractEmbeds": {"type": "object", "properties": {"ixn": {"$ref": "#/components/schemas/Ixn"}}, "required": ["ixn"]}, "MultisigRegistryInceptEmbeds": {"type": "object", "properties": {"vcp": {"$ref": "#/components/schemas/Vcp"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "vcp"]}, "ISS_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "MultisigIssueEmbeds": {"type": "object", "properties": {"acdc": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "iss": {"$ref": "#/components/schemas/Iss"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["acdc", "anc", "iss"]}, "REV_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "p", "ri", "s", "t", "v"]}, "MultisigRevokeEmbeds": {"type": "object", "properties": {"rev": {"$ref": "#/components/schemas/REV_V_1"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "rev"]}, "MultisigRpyEmbeds": {"type": "object", "properties": {"rpy": {"$ref": "#/components/schemas/Rpy"}}, "required": ["rpy"]}, "MultisigExnEmbeds": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}}, "required": ["exn"]}, "ExnEmbeds": {"type": "object", "properties": {"d": {"type": "string"}}, "required": ["d"], "oneOf": [{"$ref": "#/components/schemas/MultisigInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigRotateEmbeds"}, {"$ref": "#/components/schemas/MultisigInteractEmbeds"}, {"$ref": "#/components/schemas/MultisigRegistryInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigIssueEmbeds"}, {"$ref": "#/components/schemas/MultisigRevokeEmbeds"}, {"$ref": "#/components/schemas/MultisigRpyEmbeds"}, {"$ref": "#/components/schemas/MultisigExnEmbeds"}]}, "ExnMultisig": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "paths": {"type": "object", "additionalProperties": {}}, "groupName": {"type": "string"}, "memberName": {"type": "string"}, "sender": {"type": "string"}}, "required": ["exn", "paths"]}}}}' + == '{"paths": {"/operations": {"get": {"summary": "Get list of long running operations", "parameters": [{"in": "query", "name": "type", "schema": {"type": "string"}, "required": false, "description": "filter list of long running operations by type"}], "responses": {"200": {"description": "list of long running operations", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Operation"}}}}}}}}, "/oobis": {"post": {"summary": "Resolve OOBI and assign an alias for the remote identifier", "description": "Resolve OOBI URL or `rpy` message by process results of request and assign \'alias\' in contact data for resolved identifier", "tags": ["OOBIs"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "OOBI", "oneOf": [{"type": "object", "properties": {"oobialias": {"type": "string", "description": "alias to assign to the identifier resolved from this OOBI"}, "url": {"type": "string", "description": "URL OOBI"}, "rpy": {"type": "object", "description": "unsigned KERI `rpy` event message with endpoints"}}}]}}}}, "responses": {"202": {"description": "OOBI resolution to key state successful", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBIOperation"}}}}}}}, "/states": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "description": "qb64 identifier prefix of KEL to load", "schema": {"type": "string"}, "required": true}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyStateRecord"}}}}}, "400": {"description": "Bad request, missing required fields"}, "404": {"description": "Identifier not found in Key event database"}}}}, "/events": {"get": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Key Event Log"], "parameters": [{"in": "path", "name": "pre", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of KEL to load"}], "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/KeyEventRecord"}}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/queries": {"post": {"summary": "Display key event log (KEL) for given identifier prefix", "description": "If provided qb64 identifier prefix is in Kevers, return the current state of the identifier along with the KEL and all associated signatures and receipts", "tags": ["Query"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["pre"], "properties": {"pre": {"type": "string", "description": "qb64 identifier prefix of KEL to load"}, "anchor": {"type": "string", "description": "Anchor"}, "sn": {"type": "string", "description": "Serial number"}}}}}}, "responses": {"200": {"description": "Key event log and key state of identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QueryOperation"}}}}, "404": {"description": "Identifier not found in Key event database"}}}}, "/config": {"get": {"summary": "Retrieve agent configuration", "description": "Retrieve agent configuration (only necessary fields are exposed)", "tags": ["Config"], "responses": {"200": {"description": "Subset of configuration dict as JSON", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentConfig"}}}}}}}, "/identifiers": {"get": {"summary": "Retrieve a list of identifiers associated with the agent.", "description": "This endpoint retrieves a list of identifiers associated with the agent. It supports pagination through the \'Range\' header.", "tags": ["Identifier"], "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "The \'Range\' header is used for pagination. The default range is 0-9."}], "responses": {"200": {"description": "Successfully retrieved identifiers.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/HabStateBase"}}}}}, "206": {"description": "Successfully retrieved identifiers within the specified range."}}}, "options": {}, "post": {"summary": "Create an identifier.", "description": "This endpoint creates an identifier with the provided inception event, name, and signatures.", "tags": ["Identifier"], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"icp": {"type": "object", "description": "The inception event for the identifier."}, "name": {"type": "string", "description": "The name of the identifier."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures for the inception event."}, "group": {"type": "object", "description": "Multisig group information."}, "salty": {"type": "object", "description": "Salty parameters."}, "randy": {"type": "object", "description": "Randomly generated materials."}, "extern": {"type": "object", "description": "External parameters."}}}}}}, "responses": {"202": {"description": "Identifier creation is in progress. The response is a long running operation.", "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DelegationOperation"}, {"$ref": "#/components/schemas/DoneOperation"}]}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges": {"get": {"summary": "Get random list of words for a 2 factor auth challenge", "description": "Get the list of identifiers associated with this agent", "tags": ["Challenge/Response"], "parameters": [{"in": "query", "name": "strength", "schema": {"type": "integer"}, "description": "cryptographic strength of word list", "required": false}], "responses": {"200": {"description": "An array of random words", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Challenge"}}}}}}}, "/contacts": {"get": {"summary": "Get list of contact information associated with remote identifiers", "description": "Get list of contact information associated with remote identifiers. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "query", "name": "group", "schema": {"type": "string"}, "required": false, "description": "field name to group results by"}, {"in": "query", "name": "filter_field", "schema": {"type": "string"}, "description": "field name to search", "required": false}, {"in": "query", "name": "filter_value", "schema": {"type": "string"}, "description": "value to search for", "required": false}], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Contact"}}}}}}}}, "/oobi": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/": {"post": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"204": {"description": "KEL EXN, QRY, RPY event accepted."}}}, "put": {"summary": "Accept KERI events with attachment headers and parse", "description": "Accept KERI events with attachment headers and parse.", "tags": ["Events"], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "description": "KERI event message"}}}}, "responses": {"200": {"description": "Mailbox query response for server sent events"}, "204": {"description": "KEL or EXN event accepted."}}}}, "/notifications": {"get": {"summary": "Get list of notifications for the controller of the agent", "description": "Get list of notifications for the controller of the agent. Notifications will be sorted by creation date/time", "parameters": [{"in": "header", "name": "Range", "schema": {"type": "string"}, "required": false, "description": "size of the result list. Defaults to 25"}], "tags": ["Notifications"], "responses": {"200": {"description": "List of contact information for remote identifiers", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Notification"}}}}}}}}, "/operations/{name}": {"delete": {"summary": "Remove a specific long running operation.", "description": "This endpoint removes a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to remove."}], "responses": {"204": {"description": "Successfully removed the long running operation."}, "404": {"description": "The requested long running operation was not found."}, "500": {"description": "Internal server error. This could be due to an issue with removing the operation."}}}, "get": {"summary": "Retrieve a specific long running operation.", "description": "This endpoint retrieves the status of a long running operation by its name.", "tags": ["Operation"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The name of the long running operation to retrieve."}], "responses": {"200": {"description": "Successfully retrieved the status of the long running operation.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Operation"}}}}, "404": {"description": "The requested long running operation was not found."}}}}, "/oobis/{alias}": {"get": {"summary": "Get OOBI for specific identifier", "description": "Generate OOBI for the identifier of the specified alias and role", "tags": ["OOBIs"], "parameters": [{"in": "path", "name": "alias", "schema": {"type": "string"}, "required": true, "description": "human readable alias for the identifier generate OOBI for"}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "role for which to generate OOBI"}], "responses": {"200": {"description": "An array of Identifier key state information", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}}}}, "/agent/{caid}": {"get": {"summary": "Retrieve key state record of an agent by controller AID.", "description": "This endpoint retrieves the key state record for a given controller of an agent.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "responses": {"200": {"description": "Successfully retrieved the key state record.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentResourceResult"}}}}, "400": {"description": "Bad request. This could be due to an invalid agent or controller configuration."}, "404": {"description": "The requested controller or agent was not found."}}}, "put": {"summary": "Update agent configuration by controller AID.", "description": "This endpoint updates the agent configuration based on the provided request parameters and body.", "tags": ["Agent"], "parameters": [{"in": "path", "name": "caid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of Controller."}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["rot", "sigs", "sxlt", "kyes"], "properties": {"rot": {"type": "object", "description": "The rotation event."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}, "sxlt": {"type": "string", "description": "The salty parameters."}, "keys": {"type": "object", "description": "The keys."}}}}}}, "responses": {"204": {"description": "Successfully updated the agent configuration."}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested agent was not found."}, "500": {"description": "Internal server error. This could be due to an issue with updating the agent configuration."}}}}, "/identifiers/{name}": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DelegationOperation"}, {"$ref": "#/components/schemas/DoneOperation"}, {"$ref": "#/components/schemas/SubmitOperation"}]}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/endroles/{aid}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EndRoleOperation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/escrows/rpy": {"get": {"summary": "Retrieve reply escrows.", "description": "This endpoint retrieves the reply escrows and can filter the collection based on a specific route.", "tags": ["Reply Escrow"], "parameters": [{"in": "query", "name": "route", "schema": {"type": "string"}, "required": false, "description": "The specific route to filter the reply escrow collection."}], "responses": {"200": {"description": "Successfully retrieved the reply escrows.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/Rpy"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}}, "/challenges/{name}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "Human readable alias or prefix for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/challenges_verify/{source}": {"post": {"summary": "Sign challenge message and forward to peer identifier", "description": "Sign a challenge word list received out of bands and send `exn` peer to peer message to recipient", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"recipient": {"type": "string", "description": "human readable alias recipient identifier to send signed challenge to"}, "words": {"type": "array", "description": "challenge in form of word list", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChallengeOperation"}}}}}}, "put": {"summary": "Mark challenge response exn message as signed", "description": "Mark challenge response exn message as signed", "tags": ["Challenge/Response"], "parameters": [{"in": "path", "name": "source", "schema": {"type": "string"}, "required": true, "description": "Human readable alias for the identifier to create"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Challenge response", "properties": {"aid": {"type": "string", "description": "aid of signer of accepted challenge response"}, "said": {"type": "array", "description": "SAID of challenge message signed", "items": {"type": "string"}}}}}}}, "responses": {"202": {"description": "Success submission of signed challenge/response"}}}}, "/contacts/{prefix}": {"delete": {"summary": "Delete contact information associated with remote identifier", "description": "Delete contact information associated with remote identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to delete"}], "responses": {"202": {"description": "Contact information successfully deleted for prefix"}, "404": {"description": "No contact information found for prefix"}}}, "get": {"summary": "Get contact information associated with single remote identifier", "description": "Get contact information associated with single remote identifier. All information is meta-data and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Create new contact information for an identifier", "description": "Creates new information for an identifier, overwriting all existing information for that identifier", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}, "put": {"summary": "Update provided fields in contact information associated with remote identifier prefix", "description": "Update provided fields in contact information associated with remote identifier prefix. All information is metadata and kept in local storage only", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix to add contact metadata to"}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"description": "Contact information", "type": "object"}}}}, "responses": {"200": {"description": "Updated contact information for remote identifier", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Contact"}}}}, "400": {"description": "Invalid identifier used to update contact information"}, "404": {"description": "Prefix not found in identifier contact information"}}}}, "/oobi/{aid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/notifications/{said}": {"delete": {"summary": "Delete notification", "description": "Delete notification", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to delete"}], "responses": {"202": {"description": "Notification successfully deleted for prefix"}, "404": {"description": "No notification information found for prefix"}}}, "put": {"summary": "Mark notification as read", "description": "Mark notification as read", "tags": ["Notifications"], "parameters": [{"in": "path", "name": "said", "schema": {"type": "string"}, "required": true, "description": "qb64 said of note to mark as read"}], "responses": {"202": {"description": "Notification successfully marked as read for prefix"}, "404": {"description": "No notification information found for SAID"}}}}, "/identifiers/{name}/events": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DelegationOperation"}, {"$ref": "#/components/schemas/DoneOperation"}, {"$ref": "#/components/schemas/SubmitOperation"}]}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/submit": {"get": {"summary": "Retrieve an identifier.", "description": "This endpoint retrieves an identifier by its prefix or human-readable name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully retrieved the identifier details.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Process identifier events.", "description": "This endpoint handles the \'rot\' or \'ixn\' events of an identifier, or the request to resubmit the KEL, based on the provided request.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rot": {"type": "object", "description": "The rotation event details."}, "ixn": {"type": "object", "description": "The interaction event details."}, "submit": {"type": "object", "description": "The request to resubmit event details to witnesses."}}, "oneOf": [{"required": ["rot"]}, {"required": ["ixn"]}, {"required": ["submit"]}]}}}}, "responses": {"200": {"description": "Successfully processed the identifier\'s event.", "content": {"application/json": {"schema": {"oneOf": [{"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DelegationOperation"}, {"$ref": "#/components/schemas/DoneOperation"}, {"$ref": "#/components/schemas/SubmitOperation"}]}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}}}, "put": {"summary": "Rename an identifier.", "description": "This endpoint renames an identifier with the provided new name.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The current human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "description": "The new human-readable name for the identifier."}}, "required": ["name"]}}}}, "responses": {"200": {"description": "Successfully renamed the identifier and returns the updated information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HabState"}}}}, "400": {"description": "Bad request. This could be due to a missing or invalid name parameter."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/oobis": {"get": {"summary": "Fetch OOBI URLs of an identifier.", "description": "This endpoint fetches the OOBI URLs for a specific role associated with an identifier.", "tags": ["Identifier"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "query", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The role for which to fetch the OOBI URLs. Can be a witness, controller, agent, or mailbox."}], "responses": {"200": {"description": "Successfully fetched the OOBI URLs. The response body contains the OOBI URLs.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OOBI"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/endroles": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EndRoleOperation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/locschemes": {"post": {"summary": "Authorises a new location scheme.", "description": "This endpoint authorises a new location scheme (endpoint) for a particular endpoint identifier.", "tags": ["Loc Scheme"], "parameters": [{"in": "path", "name": "name", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The loc scheme authorisation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LocSchemeOperation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/identifiers/{name}/members": {"get": {"summary": "Fetch group member information.", "description": "This endpoint retrieves the signing and rotation members for a specific group associated with an identifier.", "tags": ["Group Member"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}], "responses": {"200": {"description": "Successfully fetched the group member information.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GroupMember"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}}, "/identifiers/{name}/delegation": {"post": {}}, "/endroles/{aid}/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EndRoleOperation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/contacts/{prefix}/img": {"get": {"summary": "Get contact image for identifer prefix", "description": "Get contact image for identifer prefix", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "required": true, "description": "qb64 identifier prefix of contact image to get"}], "responses": {"200": {"description": "Contact information successfully retrieved for prefix", "content": {"image/jpg": {"schema": {"description": "Image", "type": "binary"}}}}, "404": {"description": "No contact information found for prefix"}}}, "post": {"summary": "Uploads an image to associate with identifier.", "description": "Uploads an image to associate with identifier.", "tags": ["Contacts"], "parameters": [{"in": "path", "name": "prefix", "schema": {"type": "string"}, "description": "identifier prefix to associate image to", "required": true}], "requestBody": {"required": true, "content": {"image/jpg": {"schema": {"type": "string", "format": "binary"}}, "image/png": {"schema": {"type": "string", "format": "binary"}}}}, "responses": {"200": {"description": "Image successfully uploaded"}}}}, "/oobi/{aid}/{role}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}": {"get": {"summary": "Retrieve end roles.", "description": "This endpoint retrieves the end roles associated with an identifier prefix or human-readable name. It can also filter the end roles based on a specific role.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The identifier (AID)."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The specific role to filter the end roles."}], "responses": {"200": {"description": "Successfully retrieved the end roles. The response body contains the end roles.", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/EndRole"}}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "The requested identifier was not found."}}}, "post": {"summary": "Create an end role.", "description": "This endpoint creates an end role associated with a given identifier prefix or human-readable name.", "tags": ["End Role"], "parameters": [{"in": "path", "name": "name or prefix", "schema": {"type": "string"}, "required": true, "description": "The human-readable name of the identifier or its prefix."}, {"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "Not supported for POST. If provided, a 404 is returned."}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"rpy": {"type": "object", "description": "The reply object."}, "sigs": {"type": "array", "items": {"type": "string"}, "description": "The signatures."}}}}}}, "responses": {"202": {"description": "Accepted. The end role creation is in progress.", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EndRoleOperation"}}}}, "400": {"description": "Bad request. This could be due to missing or invalid parameters."}, "404": {"description": "Not found. The requested identifier was not found."}}}}, "/oobi/{aid}/{role}/{eid}": {"get": {"summary": "Retrieve OOBI resource.", "description": "This endpoint retrieves the OOBI resource based on the provided aid, role, and eid.", "tags": ["OOBI Resource"], "parameters": [{"in": "path", "name": "aid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of OOBI."}, {"in": "path", "name": "role", "schema": {"type": "string"}, "required": true, "description": "The requested role for OOBI rpy message."}, {"in": "path", "name": "eid", "schema": {"type": "string"}, "required": true, "description": "The qb64 identifier prefix of participant in role."}], "responses": {"200": {"description": "Successfully retrieved the OOBI resource."}, "400": {"description": "Bad request. This could be due to invalid or missing parameters."}, "404": {"description": "The requested OOBI resource was not found."}}}}, "/identifiers/{name}/endroles/{role}/{eid}": {"delete": {}}}, "info": {"title": "KERIA Interactive Web Interface API", "version": "1.0.1"}, "openapi": "3.1.0", "components": {"schemas": {"ACDCAttributes": {"type": "object", "properties": {"dt": {"type": "string"}, "i": {"type": "string"}, "u": {"type": "string"}}, "additionalProperties": true}, "ACDC_V_1": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "ri": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "ACDC_V_2": {"oneOf": [{"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "a": {"$ref": "#/components/schemas/ACDCAttributes"}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}, {"type": "object", "properties": {"v": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "u": {"type": "string"}, "rd": {"type": "string"}, "e": {"type": "string"}, "r": {"type": "string"}, "A": {"anyOf": [{"type": "string"}, {"type": "array"}]}}, "additionalProperties": false, "required": ["d", "i", "s", "v"]}]}, "IssEvent": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"enum": ["iss", "bis"]}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "Schema": {"type": "object", "properties": {"$id": {"type": "string"}, "$schema": {"type": "string"}, "title": {"type": "string"}, "description": {"type": "string"}, "type": {"type": "string"}, "credentialType": {"type": "string"}, "version": {"type": "string"}, "properties": {"type": "object", "additionalProperties": {}}, "additionalProperties": {"type": "boolean"}, "required": {"type": "array", "items": {"type": "string"}}}, "required": ["$id", "$schema", "additionalProperties", "credentialType", "description", "properties", "required", "title", "type", "version"]}, "Anchor": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}, "d": {"type": "string"}}, "required": ["d", "pre", "sn"]}, "Seal": {"type": "object", "properties": {"s": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}}, "required": ["d", "s"]}, "IXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "IXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "a": {}}, "required": ["a", "d", "i", "p", "s", "t", "v"]}, "ICP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ICP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "b", "bt", "c", "d", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "ROT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "ROT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DIP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DIP_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}, "di": {"type": "string"}}, "required": ["a", "b", "bt", "c", "d", "di", "i", "k", "kt", "n", "nt", "s", "t", "v"]}, "DRT_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "DRT_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "p": {"type": "string"}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}, {"type": "array", "items": {"type": "array", "items": {"type": "string"}}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "br": {"type": "array", "items": {"type": "string"}}, "ba": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "a": {}}, "required": ["a", "ba", "br", "bt", "c", "d", "i", "k", "kt", "n", "nt", "p", "s", "t", "v"]}, "RPY_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "r", "t", "v"]}, "RPY_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "a": {}}, "required": ["a", "d", "dt", "i", "r", "t", "v"]}, "VCP_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "ii": {"type": "string"}, "s": {"type": "string"}, "c": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string"}, "b": {"type": "array", "items": {"type": "string"}}, "n": {"type": "string"}}, "required": ["b", "bt", "c", "d", "i", "ii", "n", "s", "t", "v"]}, "ISS_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "ri", "s", "t", "v"]}, "REV_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "s": {"type": "string"}, "ri": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}}, "required": ["d", "dt", "i", "p", "ri", "s", "t", "v"]}, "EXN_V_1": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "rp": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}, "e": {"type": "object", "additionalProperties": {}}}, "required": ["a", "d", "dt", "e", "i", "p", "q", "r", "rp", "t", "v"]}, "EXN_V_2": {"type": "object", "properties": {"v": {"type": "string"}, "t": {"type": "string"}, "d": {"type": "string"}, "i": {"type": "string"}, "x": {"type": "string"}, "p": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "string"}, "q": {"type": "object", "additionalProperties": {}}, "a": {}}, "required": ["a", "d", "dt", "i", "p", "q", "r", "t", "v", "x"]}, "Credential": {"type": "object", "properties": {"sad": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "atc": {"type": "string"}, "iss": {"$ref": "#/components/schemas/IssEvent"}, "issatc": {"type": "string"}, "pre": {"type": "string"}, "schema": {"$ref": "#/components/schemas/Schema"}, "chains": {"type": "array", "items": {"type": "object", "additionalProperties": {}}}, "status": {"$ref": "#/components/schemas/CredentialState"}, "anchor": {"$ref": "#/components/schemas/Anchor"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "ancatc": {"type": "string"}}, "required": ["anc", "ancatc", "anchor", "atc", "chains", "iss", "issatc", "pre", "sad", "schema", "status"]}, "EmptyDict": {"type": "object", "properties": {}}, "CredentialStateIssOrRev": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["iss", "rev"]}, "ra": {"$ref": "#/components/schemas/EmptyDict"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "RaFields": {"type": "object", "properties": {"i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}}, "required": ["d", "i", "s"]}, "CredentialStateBisOrBrv": {"type": "object", "properties": {"vn": {}, "i": {"type": "string"}, "s": {"type": "string"}, "d": {"type": "string"}, "ri": {"type": "string"}, "a": {"$ref": "#/components/schemas/Seal"}, "dt": {"type": "string"}, "et": {"enum": ["bis", "brv"]}, "ra": {"$ref": "#/components/schemas/RaFields"}}, "required": ["a", "d", "dt", "et", "i", "ra", "ri", "s", "vn"]}, "CredentialState": {"oneOf": [{"$ref": "#/components/schemas/CredentialStateIssOrRev"}, {"$ref": "#/components/schemas/CredentialStateBisOrBrv"}]}, "Registry": {"type": "object", "properties": {"name": {"type": "string"}, "regk": {"type": "string"}, "pre": {"type": "string"}, "state": {"$ref": "#/components/schemas/CredentialState"}}, "required": ["name", "pre", "regk", "state"]}, "StateEERecord": {"type": "object", "properties": {"s": {"type": "string", "default": "0"}, "d": {"type": "string", "default": ""}, "br": {"type": "array", "items": {}}, "ba": {"type": "array", "items": {}}}}, "KeyStateRecord": {"type": "object", "properties": {"vn": {"type": "array", "items": {"type": "integer"}}, "i": {"type": "string", "default": ""}, "s": {"type": "string", "default": "0"}, "p": {"type": "string", "default": ""}, "d": {"type": "string", "default": ""}, "f": {"type": "string", "default": "0"}, "dt": {"type": "string", "default": ""}, "et": {"type": "string", "default": ""}, "kt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "k": {"type": "array", "items": {"type": "string"}}, "nt": {"oneOf": [{"type": "string"}, {"type": "array", "items": {"type": "string"}}]}, "n": {"type": "array", "items": {"type": "string"}}, "bt": {"type": "string", "default": "0"}, "b": {"type": "array", "items": {"type": "string"}}, "c": {"type": "array", "items": {"type": "string"}}, "ee": {"$ref": "#/components/schemas/StateEERecord"}, "di": {"type": "string", "default": ""}}, "required": ["b", "c", "ee", "k", "n", "kt", "nt"]}, "Controller": {"type": "object", "properties": {"state": {"$ref": "#/components/schemas/KeyStateRecord"}, "ee": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["ee", "state"]}, "AgentResourceResult": {"type": "object", "properties": {"agent": {"$ref": "#/components/schemas/KeyStateRecord"}, "controller": {"$ref": "#/components/schemas/Controller"}, "pidx": {"type": "integer"}, "ridx": {"type": ["integer", "null"], "default": null}, "sxlt": {"type": ["string", "null"], "default": null}}, "required": ["agent", "controller", "pidx"]}, "HabState": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}, "state": {"$ref": "#/components/schemas/KeyStateRecord"}, "transferable": {"type": "boolean"}, "windexes": {"type": "array", "items": {"type": "string"}}}, "required": ["icp_dt", "name", "prefix"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "SaltyState": {"type": "object", "properties": {"tier": {"$ref": "#/components/schemas/Tier"}, "sxlt": {"type": "string", "default": ""}, "pidx": {"type": "integer", "default": 0}, "kidx": {"type": "integer", "default": 0}, "stem": {"type": "string", "default": ""}, "dcode": {"type": "string", "default": ""}, "icodes": {"type": "array", "items": {"type": "string"}}, "ncodes": {"type": "array", "items": {"type": "string"}}, "transferable": {"type": "boolean", "default": false}}, "required": ["icodes", "ncodes", "tier"]}, "RandyKeyState": {"type": "object", "properties": {"prxs": {"type": "array", "items": {"type": "string"}}, "nxts": {"type": "array", "items": {"type": "string"}}}, "required": ["nxts", "prxs"]}, "GroupKeyState": {"type": "object", "properties": {"mhab": {"$ref": "#/components/schemas/HabState"}, "keys": {"type": "array", "items": {"type": "string"}}, "ndigs": {"type": "array", "items": {"type": "string"}}}, "required": ["keys", "mhab", "ndigs"]}, "ExternState": {"type": "object", "properties": {"extern_type": {"type": "string"}, "pidx": {"type": "integer"}}, "required": ["extern_type", "pidx"], "additionalProperties": true}, "HabStateBase": {"type": "object", "properties": {"name": {"type": "string"}, "prefix": {"type": "string"}, "icp_dt": {"type": "string"}}, "required": ["icp_dt", "name", "prefix"], "oneOf": [{"required": ["salty"], "properties": {"salty": {"$ref": "#/components/schemas/SaltyState"}}}, {"required": ["randy"], "properties": {"randy": {"$ref": "#/components/schemas/RandyKeyState"}}}, {"required": ["group"], "properties": {"group": {"$ref": "#/components/schemas/GroupKeyState"}}}, {"required": ["extern"], "properties": {"extern": {"$ref": "#/components/schemas/ExternState"}}}]}, "Tier": {"type": "string", "enum": ["low", "med", "high"], "description": "Tier of key material"}, "OOBI": {"type": "object", "properties": {"role": {"type": "string", "enum": ["controller", "witness", "registrar", "watcher", "judge", "juror", "peer", "mailbox", "agent"]}, "oobis": {"type": "array", "items": {"type": "string"}}}, "required": ["oobis", "role"]}, "EndRole": {"type": "object", "properties": {"cid": {"type": "string"}, "role": {"type": "string"}, "eid": {"type": "string"}}, "required": ["cid", "eid", "role"]}, "Challenge": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "string"}}, "dt": {"type": "string"}, "said": {"type": "string"}, "authenticated": {"type": "boolean"}}, "required": ["words"]}, "MemberEnds": {"type": "object", "properties": {"agent": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "controller": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "witness": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "registrar": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "watcher": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "judge": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "juror": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "peer": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}, "mailbox": {"type": ["object", "null"], "default": null, "additionalProperties": {"type": "string"}}}}, "WellKnown": {"type": "object", "properties": {"url": {"type": "string"}, "dt": {"type": "string"}}, "required": ["dt", "url"]}, "Contact": {"type": "object", "properties": {"id": {"type": "string"}, "alias": {"type": "string"}, "oobi": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}, "challenges": {"type": "array", "items": {"$ref": "#/components/schemas/Challenge"}}, "wellKnowns": {"type": "array", "items": {"$ref": "#/components/schemas/WellKnown"}}}, "required": ["id"], "additionalProperties": true}, "AidRecord": {"type": "object", "properties": {"aid": {"type": "string"}, "ends": {"$ref": "#/components/schemas/MemberEnds"}}, "required": ["aid", "ends"]}, "GroupMember": {"type": "object", "properties": {"signing": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}, "rotation": {"type": "array", "items": {"$ref": "#/components/schemas/AidRecord"}}}, "required": ["rotation", "signing"]}, "KeyEventRecord": {"type": "object", "properties": {"ked": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "atc": {"type": "string"}}, "required": ["atc", "ked"]}, "AgentConfig": {"type": "object", "properties": {"iurls": {"type": "array", "items": {"type": "string"}}}}, "Exn": {"oneOf": [{"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}, "Icp": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}]}, "Rot": {"oneOf": [{"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}]}, "Vcp": {"oneOf": [{"$ref": "#/components/schemas/VCP_V_1"}]}, "Iss": {"oneOf": [{"$ref": "#/components/schemas/ISS_V_1"}]}, "Ixn": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}]}, "Rpy": {"oneOf": [{"$ref": "#/components/schemas/RPY_V_1"}, {"$ref": "#/components/schemas/RPY_V_2"}]}, "NotificationData": {"type": "object", "properties": {"r": {"type": "string"}, "d": {"type": "string"}, "m": {"type": "string"}}, "additionalProperties": true}, "Notification": {"type": "object", "properties": {"i": {"type": "string"}, "dt": {"type": "string"}, "r": {"type": "boolean"}, "a": {"$ref": "#/components/schemas/NotificationData"}}, "required": ["a", "dt", "i", "r"]}, "ExchangeResource": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "pathed": {"type": "object", "additionalProperties": {}}}, "required": ["exn", "pathed"]}, "MultisigInceptEmbeds": {"type": "object", "properties": {"icp": {"$ref": "#/components/schemas/Icp"}}, "required": ["icp"]}, "MultisigRotateEmbeds": {"type": "object", "properties": {"rot": {"$ref": "#/components/schemas/Rot"}}, "required": ["rot"]}, "MultisigInteractEmbeds": {"type": "object", "properties": {"ixn": {"$ref": "#/components/schemas/Ixn"}}, "required": ["ixn"]}, "MultisigRegistryInceptEmbeds": {"type": "object", "properties": {"vcp": {"$ref": "#/components/schemas/Vcp"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "vcp"]}, "MultisigIssueEmbeds": {"type": "object", "properties": {"acdc": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "iss": {"$ref": "#/components/schemas/Iss"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["acdc", "anc", "iss"]}, "MultisigRevokeEmbeds": {"type": "object", "properties": {"rev": {"$ref": "#/components/schemas/REV_V_1"}, "anc": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}}, "required": ["anc", "rev"]}, "MultisigRpyEmbeds": {"type": "object", "properties": {"rpy": {"$ref": "#/components/schemas/Rpy"}}, "required": ["rpy"]}, "MultisigExnEmbeds": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}}, "required": ["exn"]}, "ExnEmbeds": {"type": "object", "properties": {"d": {"type": "string"}}, "required": ["d"], "oneOf": [{"$ref": "#/components/schemas/MultisigInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigRotateEmbeds"}, {"$ref": "#/components/schemas/MultisigInteractEmbeds"}, {"$ref": "#/components/schemas/MultisigRegistryInceptEmbeds"}, {"$ref": "#/components/schemas/MultisigIssueEmbeds"}, {"$ref": "#/components/schemas/MultisigRevokeEmbeds"}, {"$ref": "#/components/schemas/MultisigRpyEmbeds"}, {"$ref": "#/components/schemas/MultisigExnEmbeds"}]}, "ExnMultisig": {"type": "object", "properties": {"exn": {"$ref": "#/components/schemas/Exn"}, "paths": {"type": "object", "additionalProperties": {}}, "groupName": {"type": "string"}, "memberName": {"type": "string"}, "sender": {"type": "string"}}, "required": ["exn", "paths"]}, "OOBIMetadata": {"type": "object", "properties": {"oobi": {"type": "string"}}, "required": ["oobi"]}, "PendingOOBIOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/OOBIMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedOOBIOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/OOBIMetadata"}, "response": {"$ref": "#/components/schemas/KeyStateRecord"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "OperationStatus": {"type": "object", "properties": {"code": {"type": "integer"}, "message": {"type": "string"}, "details": {"type": ["object", "null"], "additionalProperties": {}}}, "required": ["code", "message"]}, "FailedOOBIOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/OOBIMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "OOBIOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingOOBIOperation"}, {"$ref": "#/components/schemas/CompletedOOBIOperation"}, {"$ref": "#/components/schemas/FailedOOBIOperation"}]}, "QueryMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}, "anchor": {"$ref": "#/components/schemas/Anchor"}}, "required": ["pre", "sn"]}, "PendingQueryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/QueryMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedQueryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/QueryMetadata"}, "response": {"$ref": "#/components/schemas/KeyStateRecord"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedQueryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/QueryMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "QueryOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingQueryOperation"}, {"$ref": "#/components/schemas/CompletedQueryOperation"}, {"$ref": "#/components/schemas/FailedQueryOperation"}]}, "EndRoleMetadata": {"type": "object", "properties": {"cid": {"type": "string"}, "role": {"type": "string"}, "eid": {"type": "string"}}, "required": ["cid", "eid", "role"]}, "PendingEndRoleOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/EndRoleMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedEndRoleOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/EndRoleMetadata"}, "response": {"oneOf": [{"$ref": "#/components/schemas/RPY_V_1"}, {"$ref": "#/components/schemas/RPY_V_2"}]}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedEndRoleOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/EndRoleMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "EndRoleOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingEndRoleOperation"}, {"$ref": "#/components/schemas/CompletedEndRoleOperation"}, {"$ref": "#/components/schemas/FailedEndRoleOperation"}]}, "WitnessMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}}, "required": ["pre", "sn"]}, "PendingWitnessOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/WitnessMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedWitnessOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/WitnessMetadata"}, "response": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}]}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedWitnessOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/WitnessMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "WitnessOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingWitnessOperation"}, {"$ref": "#/components/schemas/CompletedWitnessOperation"}, {"$ref": "#/components/schemas/FailedWitnessOperation"}]}, "DelegationMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}}, "required": ["pre", "sn"]}, "PendingDelegationOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedDelegationOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegationMetadata"}, "response": {"oneOf": [{"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedDelegationOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "DelegationOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingDelegationOperation"}, {"$ref": "#/components/schemas/CompletedDelegationOperation"}, {"$ref": "#/components/schemas/FailedDelegationOperation"}]}, "RegistryOperationMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "depends": {}, "anchor": {"$ref": "#/components/schemas/Anchor"}}, "required": ["anchor", "depends", "pre"]}, "PendingRegistryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/RegistryOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "RegistryOperationResponse": {"type": "object", "properties": {"anchor": {"$ref": "#/components/schemas/Anchor"}}, "required": ["anchor"]}, "CompletedRegistryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/RegistryOperationMetadata"}, "response": {"$ref": "#/components/schemas/RegistryOperationResponse"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedRegistryOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/RegistryOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "RegistryOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingRegistryOperation"}, {"$ref": "#/components/schemas/CompletedRegistryOperation"}, {"$ref": "#/components/schemas/FailedRegistryOperation"}]}, "LocSchemeMetadata": {"type": "object", "properties": {"eid": {"type": "string"}, "scheme": {"type": "string"}, "url": {"type": "string"}}, "required": ["eid", "scheme", "url"]}, "PendingLocSchemeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/LocSchemeMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedLocSchemeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/LocSchemeMetadata"}, "response": {"$ref": "#/components/schemas/LocSchemeMetadata"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedLocSchemeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/LocSchemeMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "LocSchemeOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingLocSchemeOperation"}, {"$ref": "#/components/schemas/CompletedLocSchemeOperation"}, {"$ref": "#/components/schemas/FailedLocSchemeOperation"}]}, "ChallengeOperationMetadata": {"type": "object", "properties": {"words": {"type": "array", "items": {"type": "string"}}}, "required": ["words"]}, "PendingChallengeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ChallengeOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "ChallengeOperationResponse": {"type": "object", "properties": {"exn": {"oneOf": [{"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}}, "required": ["exn"]}, "CompletedChallengeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ChallengeOperationMetadata"}, "response": {"$ref": "#/components/schemas/ChallengeOperationResponse"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedChallengeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ChallengeOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "ChallengeOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingChallengeOperation"}, {"$ref": "#/components/schemas/CompletedChallengeOperation"}, {"$ref": "#/components/schemas/FailedChallengeOperation"}]}, "ExchangeOperationMetadata": {"type": "object", "properties": {"said": {"type": "string"}}, "required": ["said"]}, "PendingExchangeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ExchangeOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedExchangeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ExchangeOperationMetadata"}, "response": {"$ref": "#/components/schemas/ExchangeOperationMetadata"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedExchangeOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/ExchangeOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "ExchangeOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingExchangeOperation"}, {"$ref": "#/components/schemas/CompletedExchangeOperation"}, {"$ref": "#/components/schemas/FailedExchangeOperation"}]}, "SubmitOperationMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}}, "required": ["pre", "sn"]}, "PendingSubmitOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/SubmitOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedSubmitOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/SubmitOperationMetadata"}, "response": {"$ref": "#/components/schemas/KeyStateRecord"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedSubmitOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/SubmitOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "SubmitOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingSubmitOperation"}, {"$ref": "#/components/schemas/CompletedSubmitOperation"}, {"$ref": "#/components/schemas/FailedSubmitOperation"}]}, "DoneOperationMetadata": {"type": "object", "properties": {"response": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}, "pre": {"type": ["string", "null"], "default": null}}, "required": ["response"]}, "PendingDoneOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DoneOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedDoneOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DoneOperationMetadata"}, "response": {"oneOf": [{"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/EXN_V_1"}, {"$ref": "#/components/schemas/EXN_V_2"}]}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedDoneOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DoneOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "DoneOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingDoneOperation"}, {"$ref": "#/components/schemas/CompletedDoneOperation"}, {"$ref": "#/components/schemas/FailedDoneOperation"}]}, "CredentialOperationMetadata": {"type": "object", "properties": {"ced": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}, "depends": {"oneOf": [{"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}, {"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}]}}, "required": ["ced"]}, "CredentialOperationResponse": {"type": "object", "properties": {"ced": {"oneOf": [{"$ref": "#/components/schemas/ACDC_V_1"}, {"$ref": "#/components/schemas/ACDC_V_2"}]}}}, "PendingCredentialOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/CredentialOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedCredentialOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/CredentialOperationMetadata"}, "response": {"$ref": "#/components/schemas/CredentialOperationResponse"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedCredentialOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/CredentialOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "CredentialOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingCredentialOperation"}, {"$ref": "#/components/schemas/CompletedCredentialOperation"}, {"$ref": "#/components/schemas/FailedCredentialOperation"}]}, "GroupOperationMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "sn": {"type": "integer"}}, "required": ["pre", "sn"]}, "PendingGroupOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/GroupOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedGroupOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/GroupOperationMetadata"}, "response": {"oneOf": [{"$ref": "#/components/schemas/IXN_V_1"}, {"$ref": "#/components/schemas/IXN_V_2"}, {"$ref": "#/components/schemas/ICP_V_1"}, {"$ref": "#/components/schemas/ICP_V_2"}, {"$ref": "#/components/schemas/ROT_V_1"}, {"$ref": "#/components/schemas/ROT_V_2"}, {"$ref": "#/components/schemas/DIP_V_1"}, {"$ref": "#/components/schemas/DIP_V_2"}, {"$ref": "#/components/schemas/DRT_V_1"}, {"$ref": "#/components/schemas/DRT_V_2"}]}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedGroupOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/GroupOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "GroupOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingGroupOperation"}, {"$ref": "#/components/schemas/CompletedGroupOperation"}, {"$ref": "#/components/schemas/FailedGroupOperation"}]}, "DelegatorOperationMetadata": {"type": "object", "properties": {"pre": {"type": "string"}, "teepre": {"type": "string"}, "anchor": {"$ref": "#/components/schemas/Anchor"}, "depends": {"oneOf": [{"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DoneOperation"}]}}, "required": ["pre", "teepre"]}, "PendingDelegatorOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegatorOperationMetadata"}, "done": {"default": false, "enum": [false]}}, "required": ["name"]}, "CompletedDelegatorOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegatorOperationMetadata"}, "response": {"type": "string"}, "done": {"default": true, "enum": [true]}}, "required": ["name", "response"]}, "FailedDelegatorOperation": {"type": "object", "properties": {"name": {"type": "string"}, "metadata": {"$ref": "#/components/schemas/DelegatorOperationMetadata"}, "error": {"$ref": "#/components/schemas/OperationStatus"}, "done": {"default": true, "enum": [true]}}, "required": ["error", "name"]}, "DelegatorOperation": {"oneOf": [{"$ref": "#/components/schemas/PendingDelegatorOperation"}, {"$ref": "#/components/schemas/CompletedDelegatorOperation"}, {"$ref": "#/components/schemas/FailedDelegatorOperation"}]}, "Operation": {"oneOf": [{"$ref": "#/components/schemas/OOBIOperation"}, {"$ref": "#/components/schemas/QueryOperation"}, {"$ref": "#/components/schemas/EndRoleOperation"}, {"$ref": "#/components/schemas/WitnessOperation"}, {"$ref": "#/components/schemas/DelegationOperation"}, {"$ref": "#/components/schemas/RegistryOperation"}, {"$ref": "#/components/schemas/LocSchemeOperation"}, {"$ref": "#/components/schemas/ChallengeOperation"}, {"$ref": "#/components/schemas/ExchangeOperation"}, {"$ref": "#/components/schemas/SubmitOperation"}, {"$ref": "#/components/schemas/DoneOperation"}, {"$ref": "#/components/schemas/CredentialOperation"}, {"$ref": "#/components/schemas/GroupOperation"}, {"$ref": "#/components/schemas/DelegatorOperation"}]}}}}' )