{
  "id": "type-p17",
  "revision": "4631fa5b36c58210e134542658c4e5be973eb66f8c3c0673a0aab6602377d7d3",
  "regions": [
    {
      "id": "native",
      "label": "Native",
      "parent": null
    },
    {
      "id": "common-logic",
      "label": "Common logic",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "owner",
      "label": "Message buffer owner",
      "kind": "N26",
      "region": "native",
      "ports": [
        {
          "id": "view",
          "profile": "P17",
          "contract": "BoundedBorrowedMessageViewV1",
          "polarity": "Offer"
        },
        {
          "id": "validationView",
          "profile": "P17",
          "contract": "BoundedBorrowedMessageViewV1",
          "polarity": "Offer"
        },
        {
          "id": "release",
          "profile": "P13",
          "contract": "AllBorrowersReleasedV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "decode",
      "label": "FlexBuffer decoder",
      "kind": "N01",
      "region": "common-logic",
      "ports": [
        {
          "id": "view",
          "profile": "P17",
          "contract": "BoundedBorrowedMessageViewV1",
          "polarity": "Require"
        },
        {
          "id": "value",
          "profile": "P01",
          "contract": "CopiedDecodedMessageV1",
          "polarity": "Offer"
        },
        {
          "id": "scope",
          "profile": "P21",
          "contract": "MessageBorrowScopeV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "validate",
      "label": "Bounds validator",
      "kind": "N01",
      "region": "common-logic",
      "ports": [
        {
          "id": "view",
          "profile": "P17",
          "contract": "BoundedBorrowedMessageViewV1",
          "polarity": "Require"
        },
        {
          "id": "scope",
          "profile": "P21",
          "contract": "MessageBorrowScopeV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "result",
      "label": "Decoded state",
      "kind": "N05",
      "region": "common-logic",
      "ports": [
        {
          "id": "value",
          "profile": "P01",
          "contract": "CopiedDecodedMessageV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "lease",
      "label": "Borrow lease tracker",
      "kind": "N05",
      "region": "native",
      "ports": [
        {
          "id": "scope",
          "profile": "P21",
          "contract": "MessageBorrowScopeV1",
          "polarity": "Offer"
        },
        {
          "id": "released",
          "profile": "P13",
          "contract": "AllBorrowersReleasedV1",
          "polarity": "Offer"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "borrow",
      "kind": "H02",
      "incidences": [
        {
          "node": "owner",
          "port": "view",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "decode",
          "port": "view",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "validate",
      "kind": "H02",
      "incidences": [
        {
          "node": "owner",
          "port": "validationView",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "validate",
          "port": "view",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "decoded",
      "kind": "H02",
      "incidences": [
        {
          "node": "decode",
          "port": "value",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "result",
          "port": "value",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "scope",
      "kind": "H19",
      "incidences": [
        {
          "node": "lease",
          "port": "scope",
          "role": "owner",
          "ordinal": 0
        },
        {
          "node": "decode",
          "port": "scope",
          "role": "resource",
          "ordinal": 0
        },
        {
          "node": "validate",
          "port": "scope",
          "role": "resource",
          "ordinal": 1
        }
      ]
    },
    {
      "id": "release",
      "kind": "H03",
      "incidences": [
        {
          "node": "lease",
          "port": "released",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "owner",
          "port": "release",
          "role": "target",
          "ordinal": 0
        }
      ]
    }
  ]
}
