# Machine Readable Governance (interaction draft) ``` { "@context": ["https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0430-machine-readable-governance-frameworks/context.jsonld"], "format": "1.0", "id": "<uuid>", "name": "Trusted traveler credential issuance and verification", "version": "0.1", "description": "Typical interaction to receive trusted traveler credential", "last_updated": "2020-11-02", "docs_uri": "TBA", "data_uri": "TBA", "topics": ["medical"], "jurisdictions": ["us>ny>nyc"], "geos": ["USA"], "schemas": ["4CLG5pU5v294VdkMWxSByu:2:Highfive:1.0"], "roles": [ {"holder": {}}, {"issuer": {"start_states": ["start"]}}, {"verifier": {}} ], "states": { "start": { # Issuer starts the interaction by initiating the connection with holder "role": "issuer", "initial": "true", "actions": [{ "name": "initiate_connection", "type": "connection", "proof_request": "getHolderInfo" }], "next": "identificate-holder" }, "identificate-holder": { # Holder presents id and demographics "role": "holder", "intitial": "true", "actions": [{ "name": "present_legal_proof", "type": "proof", "content": ["passport", "demographics"] }], "next": ["test-id", "test-result", "exemption", "vaccine"] }, "test-id": { # Issuer issues test id to the holder "role": "issuer", "actions": [{ "name": "issue_test_id", "type": "credential", "content": ["test_id_credential", "test_result_credential", "exemption_credential", "vaccine_credential"] }], "next": ["test-result", "exemption", "vaccine"] }, "test-result": { # Issuer issues test result credential to the holder "role": "issuer", "actions": [{ "name": "issue_test_result", "type": "credential", "content": "test_result_credential", "recipient": "holder" }], "next": "connect-to-verifier" }, "exemption": { # Issuer issues exemption credential to the holder "role": "issuer", "actions": [{ "name": "issue_exemption", "type": "credential", "content": "exemption_credential", "recipient": "holder" }], "next": "connect-to-verifier" }, "vaccine": { # Issuer issues vaccine credential to the holder "role": "issuer", "actions": [{ "name": "issue_vaccine", "type": "credential", "content": "vaccine_credential", "recipient": "holder" }], "next": "connect-to-verifier" }, # need to change the name of the state... "connect-to-verifier": { # Holder initiates connection with the verifier "role": "holder", "actions": [{ "name": "initiate_connection", "type": ["connection", "proof"], # can have more than 1? "content": ["passport", "demographics"], "proof_presentation": "shareHoldersInfo" }], "next": "validate-proof" }, "validate-proof": { # Verifier validates health proof from the holder "role": "verifier", "initial": "true", "actions": [{ "name": "validate-proof", "type": "proof", "proof_request": "getHolderCredential" }], "next": ["issue-trusted-traveler", "reject-trusted-traveler"] }, "issue-trusted-traveler": { # Verifier issues trusted traveler credential to the holder "role": "issuer", "actions": [{ "name": "issue_trusted_traveler", "type": "credential", "content": "trusted_traveler_credential" }] }, "reject-trusted-traveler": { # Verifier issues trusted traveler credential to the holder "role": "issuer", "actions": [{ "name": "issue_trusted_traveler", "type": "message", "content": "Sorry, your trusted traveler credential request was rejected, due to $reason" }] } } } ``` # Rules Draft Beautified ``` { "@context": [ "https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0430-machine-readable-governance-frameworks/context.jsonld" ], "format": "1.0", "id": "<uuid>", "name": "Trusted traveler credential issuance and verification", "version": "0.1", "description": "Typical interaction to receive trusted traveler credential", "last_updated": "2020-11-02", "docs_uri": "TBA", "data_uri": "TBA", "topics": [ "medical" ], "jurisdictions": [ "us>ny>nyc" ], "geos": [ "USA" ], "schemas": [ "4CLG5pU5v294VdkMWxSByu:2:Highfive:1.0" ], "roles": [ { "holder": {} }, { "issuer": { "start_states": [ "start" ] } }, { "verifier": {} } ], "states": { "start": { "role": "issuer", "initial": "true", "actions": [ { "name": "initiate_connection", "type": "connection", "proof_request": "getHolderInfo" } ], "next": "identificate-holder" }, "identificate-holder": { "role": "holder", "intitial": "true", "actions": [ { "name": "present_legal_proof", "type": "proof", "content": [ "passport", "demographics" ] } ], "next": [ "test-id", "test-result", "exemption", "vaccine" ] }, "test-id": { "role": "issuer", "actions": [ { "name": "issue_test_id", "type": "credential", "content": [ "test_id_credential", "test_result_credential", "exemption_credential", "vaccine_credential" ] } ], "next": [ "test-result", "exemption", "vaccine" ] }, "test-result": { "role": "issuer", "actions": [ { "name": "issue_test_result", "type": "credential", "content": "test_result_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "exemption": { "role": "issuer", "actions": [ { "name": "issue_exemption", "type": "credential", "content": "exemption_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "vaccine": { "role": "issuer", "actions": [ { "name": "issue_vaccine", "type": "credential", "content": "vaccine_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "connect-to-verifier": { "role": "holder", "actions": [ { "name": "initiate_connection", "type": [ "connection", "proof" ], "content": [ "passport", "demographics" ], "proof_presentation": "shareHoldersInfo" } ], "next": "validate-proof" }, "validate-proof": { "role": "verifier", "initial": "true", "actions": [ { "name": "validate-proof", "type": "proof", "proof_request": "getHolderCredential" } ], "next": [ "issue-trusted-traveler", "reject-trusted-traveler" ] }, "issue-trusted-traveler": { "role": "issuer", "actions": [ { "name": "issue_trusted_traveler", "type": "credential", "content": "trusted_traveler_credential" } ] }, "reject-trusted-traveler": { "role": "issuer", "actions": [ { "name": "issue_trusted_traveler", "type": "message", "content": "Sorry, your trusted traveler credential request was rejected, due to $reason" } ] } } } ``` # Mike's Updated Version ``` { "@context": [ "https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0430-machine-readable-governance-frameworks/context.jsonld" ], "format": "1.0", "id": "<uuid>", "name": "Trusted traveler credential issuance and verification", "version": "0.1", "description": "Typical interaction to receive trusted traveler credential", "last_updated": "2020-11-02", "docs_uri": "TBA", "data_uri": "TBA", "topics": [ "medical" ], "jurisdictions": [ "US>US-NY>New York City", "AW" ], "geos": [ "United States of America", "Aruba" ], "schemas": [ "4CLG5pU5v294VdkMWxSByu:2:Email:1.0", "4CLG5pU5v294VdkMWxSByu:2:SMS:1.0", "4CLG5pU5v294VdkMWxSByu:2:Medical_Release:1.0", "4CLG5pU5v294VdkMWxSByu:2:Lab_Order:1.0", "4CLG5pU5v294VdkMWxSByu:2:Lab_Result:1.0", "4CLG5pU5v294VdkMWxSByu:2:Vaccine:1.0", "4CLG5pU5v294VdkMWxSByu:2:Vaccine_Exemption:1.0", "4CLG5pU5v294VdkMWxSByu:2:Trusted_Traveler:1.0" ], "roles": [ { "holder": {} }, { "issuer": { "start_states": [ "start" ] } }, { "verifier": {} } ], "prerequisites": { "lab-result": { "lab-order" }, "trusted-traveler": { {"lab-result", "vaccine", "vaccine-exemption"} } } "actions": { // maybe call this states? "start": { "role": "issuer", "initial": "true", "actions": [ { "name": "initiate_connection", "type": "connection", "proof_request": "getHolderInfo" } ], "next": "identify-holder" }, "identify-holder": { "role": {"issuer", "verifier"}, "initial": "true", "actions": [ { "name": "present_legal_proof", "type": "proof", "content": [ "passport", "demographics" ] } ], "next": [ "lab-order", "lab-result", "exemption", "vaccine" ] }, "lab-order": { "role": "issuer", "actions": [ { "name": "issue_test_id", "type": "credential", "content": [ "test_id_credential", "test_result_credential", "exemption_credential", "vaccine_credential" ] } ], "next": [ "test-result", "exemption", "vaccine" ] }, "lab-result": { "role": "issuer", "actions": [ { "name": "issue_test_result", "type": "credential", "content": "test_result_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "exemption": { "role": "issuer", "actions": [ { "name": "issue_exemption", "type": "credential", "content": "exemption_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "vaccine": { "role": "issuer", "actions": [ { "name": "issue_vaccine", "type": "credential", "content": "vaccine_credential", "recipient": "holder" } ], "next": "connect-to-verifier" }, "connect-to-verifier": { "role": "holder", "actions": [ { "name": "initiate_connection", "type": [ "connection", "proof" ], "content": [ "passport", "demographics" ], "proof_presentation": "shareHoldersInfo" } ], "next": "validate-proof" }, "validate-proof": { "role": "verifier", "initial": "true", "actions": [ { "name": "validate_proof", "type": "proof", "proof_request": "getHolderCredential" } ], "next": [ "issue-trusted-traveler", "reject-trusted-traveler" ] }, "issue-trusted-traveler": { "role": "issuer", "actions": [ { "name": "issue_trusted_traveler", "type": "credential", "content": "trusted_traveler_credential" } ] }, "reject-trusted-traveler": { "role": "issuer", "actions": [ { "name": "issue_trusted_traveler", "type": "message", "content": "Sorry, your trusted traveler credential request was rejected, due to $reason" } ] } } } ```